c++ Why do I get "does not name a type" error?
<p>In my main class I have:</p>

<pre><code>#include "main.h"
outPut O;
int main(){
...
}
</code></pre>

<p>where the main.h file has #include "outPut.h"</p>

<p>the "outPut.h" line has:</p>

<pre><code>#ifndef OUTPUT_H
#define OUTPUT_H

#include &lt;iostream&gt;
#include &lt;fstream&gt;

    #include "properties.h"
    #include "particles.h"

    class outPut{
     public:
      outPut();
      std::ofstream file;
      void show(lipid * l);
    };

    #endif
</code></pre>

<p>and the outPut.cpp:</p>

<pre><code>#include "outPut.h"

outPut::outPut(){
}
</code></pre>

<p>When I compile this I get the error: </p>

<blockquote>
  <p>main.cpp:3: error: ‘outPut’ does not
  name a type</p>
</blockquote>

<p>Why so?</p>

<p>Thanks...</p>

<p>Edit, found it. main.h wasn't saved and the #include "outPut.h" was canceled.</p>
