The problem is probably a circular dependencies in your header structure. GameForm.h includes GameObject.h, and GameObject.h in turn includes GameSpace.h. We can't look any further, but if the inclusion chain through GameSpace.h somehow ends up in GameForm.h again, you'll run into problems.

Note that GameObject.h doesn't actually need to include GameSpace.h in the first place - you're only working with pointers to GameSpace, so a simple declaration would suffice:

The problem is probably a circular dependencies in your header structure. GameForm.h includes GameObject.h, and GameObject.h in turn includes GameSpace.h. We can't look any further, but if the inclusion chain through GameSpace.h somehow ends up in GameForm.h again, you'll run into problems.

Note that GameObject.h doesn't actually need to include GameSpace.h in the first place - you're only working with pointers to GameSpace, so a simple declaration would suffice:

class GameSpace;
class GameObject
{
GameSpace* GS;
// ...
};

Ah... so I don't need to #include if I'm just working with pointers... and I just need a forward declaration. Got it. Will look at my code again.

But I thought the header guard #ifndef #define would've taken care of that...

Ah... so I don't need to #include if I'm just working with pointers... and I just need a forward declaration. Got it. Will look at my code again. But I thought the header guard #ifndef #define would've taken care of that...

The header guard will only take care of infinite inclusion loops. Say you have a Foo.h that includes Bar.h, and a Bar.h that in turn includes Foo.h.

Now, for another file that includes Foo.h, it will define the header guard for Foo.h, then includes Bar.h (with appropriate header guard), then again includes Foo.h, which does nothing as the header guard of Foo.h is already active. Then it proceeds with the declarations and definitions in Bar.h, and then those in Foo.h

So, if Bar needed the definition of Foo, it will never get to it if you include Foo.h first.

Would I need to #include "OtherClass.h" if I'm using member functions of that OtherClass?

Yes, as soon as the compiler needs to know about the contents of the class (such as when accessing members, doing sizeof(), or using it as a base class), then the whole definition is needed. Note that for return types and parameters in function declarations, you don't need the definition either. In your example, you could choose to implement the function in the source file rather than in the header.