title: How to define a base class in a seperate file than the header file and not throw a "base class undefined" error?
body: <p>Edit: I have found my problem, even through I asked a crappy question, I found circular inclusion and fixed it.</p>
  
  <p>I am getting a strange error: <code>error C2504: 'CUpdatable' : base class undefined</code>. It is strange be cause in my code I have included both the base class header file, and even have the class prototype. Here are all of the relevant pieces of code:</p>
  
  <p>In CRoom.h</p>
  
  <pre><code>    #ifndef CROOM_H
      #define CROOM_H
  
      #include "CUpdatable.h"
  
      class CUpdatable;
  
      class CRoom : public CUpdatable // &lt;-- error here "CUpdatable is undefined"
      {
              ...
      }
  
      #endif
  </code></pre>
  
  <p>In CRoom.cpp</p>
  
  <pre><code>    #include "stdafx.h"
      #include "CRoom.h"
  
      CRoom:: // ...
      // etc
  </code></pre>
  
  <p>In CUpdatable.h</p>
  
  <pre><code>    #ifndef CUPDATABLE_H
      #define CUPDATABLE_H
  
      class CUpdatable
      {
              ...
      }
  
      #endif
  </code></pre>
  
  <p>In CUpdatable.cpp</p>
  
  <pre><code>    #include "stdafx.h"
  
      CUpdatable:: // ...
      // etc
  </code></pre>
  
  <p>My first guess was to include the class prototype <code>class CUpdatable;</code> within CRoom.h, but that has not worked.</p>
  
  <p>What looks like is happening is that the header files are not seeing the .cpp files at compile time, so CUpdatable does not have definitions at that point, and throws this error. So how do you fix this?</p>