C++: Where can I define the body for a private function?
- by Martijn Courteaux
Hi,
I have a header like this (header guards not shown):
class GameSystem
{
public:
GameSystem(Game *pcGame);
virtual ~GameSystem();
void Setup();
private:
void InitGame();
void RunGame();
void ExitGame();
Game *m_pcGame;
/* Properties */
int m_nWidth;
int m_nHeight;
int m_nFps;
bool m_bFullscreen;
};
Where can I define the body for InitGame(), RunGame() and ExitGame()? Can I define it in my .cpp file? If so, how? Or am I obliged to make their body in my .h file?
I'm using Eclipse and I began typing: void GameSystem:: and then he doesn't suggest the private functions.