Inheritance Problem, Forward Class Declaration Not Helping
Posted: Wed Nov 26, 2008 1:26 am
I'm trying to implement an FSM of sorts, and I'm getting this error,
cGameState.h
cGameState.cpp
cMainMenu.h
cMainMenu.cpp
I wrote it, it wasn't working, so I tried a Forward Class Declaration.
cMainMenu.h
and I still get the same error. I realize that it is probably just some silly
little something I'm missing, but I need help... PLEASE....
Thanks in advance
with this code:cmainmenu.h( 18 ) : error C2504: 'cGameState' : base class undefined
cGameState.h
Code: Select all
class cGameState
{
yada yada yada.....
};
Code: Select all
#include "cGameState.h"
void cGameState::yada yada yada.....
Code: Select all
#include "cGameState.h"
class cMainMenu : public cGameState
{
yada yada yada.....
};
Code: Select all
#include "cMainMenu.h"
void cMainMenu::yada yada yada.....
cMainMenu.h
Code: Select all
class cGameState;
class cMainMenu : public cGameState
{
............
};
little something I'm missing, but I need help... PLEASE....
Thanks in advance