Will everything work the same if I cut and paste my .cpp to the bottom of my .h?
<p>I have a <strong>very simple</strong> class and I'd like to consolidate it to a single .h file. Will everything work the same if I cut and paste the guts of my .cpp to the bottom of my .h?</p>

<p>In particular, there are static member variable initializations  <code>int MyClass::myStaticVar = 0;</code> outside of any class definition at the top of the .cpp, and following that, there are static member function implementations <code>void MyClass::myStaticMethod() {...}</code>. Some <em>non-static</em> member functions are already being implemented in the .h, not the .cpp.  So you can see there are some nuances here that I'd like to clarify.</p>

<hr>

<p><strong>Edit</strong> So far, what I'm getting is:</p>

<blockquote>
  <p>This is naughty, but it will work if you only <code>#include</code> the .h once. 
  It breaks the convention and doesn't really work like a .h so it might
  as well be named .doofus.</p>
</blockquote>

<p>Now, for example, look at the <a href="http://sourceforge.net/projects/reactivision/files/TUIO%201.0/TUIO-Clients%201.4/TUIO_CPP-1.4.zip/download" rel="nofollow">TUIO C++ bindings</a>. A lot of the classes consist of one .h file, no cpp (TuioPoint.h, TuioCursor.h, TuioObject.h, etc).  I don't think this is so bad...</p>
