I have more than one sources files and header files. They are;
main.cpp tools.cpp hh.cpp fitness.cpp
tools.h hh.h fitness.h
I want to define an ofstream in the tools.h
The tools.h is included in the all other sources files. But when I add the std::ofstream myOutput; into the tools.h, it says "multiple definition of myOutput". However, there is not any other line about the myOutput variable.
If I can define it properly, then I want to do myOutput.open("observe.txt",std::ofstream::app);.