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