Skip to main content
GameDev.net gamedev.net
🔒 Locked

including Headers

Started by guyaton Jan 29, 2006 at 4:26 PM 1 replies 550+ views
Original Post
guyaton
guyaton
I was reading this article, however it did not answer my questions. I have almost a pure abstract class, CState. The constructor takes a pointer to CGameEngine. Another class CViewState, is a child class of CState. Another class CStateManager also includes the header file that contains CState. I tried placing class CState in the header file that contains CGameEngine, CViewState and the other Classes in CState. However when I compile I get that CState is undefined, undefined type CState, or left of <**Variable of type CViewState**>->StartState() must point to a class/struct/union. Is there an easy way to fix this? The only way I can think of is combining some of the files, but even this can get messy. thanks in advance, ~guyaton
~guyaton
SiCrane
SiCrane
It sounds like you're trying to define your functions inside the headers. Try moving the function definitions to the source files.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.