error: Class has not been declared despite header inclusion, and the code compiling fine elsewhere
<p>So I have a class included in another class that keeps throwing a compile error of the form "error: 'ProblemClass' has not been declared. The files are set up thusly:</p>

<pre><code>#ifndef PROBLEMCLASS_H
#define PROBLEMCLASS_H

#include &lt;iostream&gt;
#include &lt;cmath&gt;

class ProblemClass
{
  public:

    virtual void Init() = 0;
};

#endif
</code></pre>

<p>and the class where the error occurs looks like this:</p>

<pre><code>#ifndef ACLASS_H
#define ACLASS_H

#include "problemclass.h"

class AClass : public Base
{
  public:

    void DoSomething(ProblemClass* problem);

};

#endif
</code></pre>

<p>The compile error occurs at void Dosomething();</p>

<p>I'm aware the code here isn't enough to solve the problem. I've been unable to create a minimal example that can reproduce it. So my question is much more general; what sort of things might cause this? Is there anything in particular I should look for, or some line of enquiry I should be following to track it down?</p>

<p>This code compiles fine in an almost identical version of the project.</p>

<p>Help of any sort would be greatly appreciated, no matter how vague. I'm using codeblocks 10.05 with mingw4.4.1 in win 7 64 bit.</p>
