i have a class for managing tilesets for games. it is a singleton class ( see here for info on singletons ), and i am getting some weird problems
here is my class decleration:
and my program crashes on this line:Code:class TileSetManager { private: static TileSetManager * m_pSingletonPointer; int tilesetID; // private constructors TileSetManager(void){} TileSetManager(TileSetManager&){} TileSetManager&operator=(TileSetManager&){ return *this; } public: virtual ~TileSetManager(void); static TileSetManager *GetInstance() { if ( ! m_pSingletonPointer ) { m_pSingletonPointer = new TileSetManager; } return m_pSingletonPointer; } };
m_pSingletonPointer = new TileSetManager;
i have about 20 singleton classes in this project and never had this problem. in my watch window of the debugger, it says "error symbol 'this' not found"... ive tried everything i can think of. i dont have a clue what the problem could be. any ideas?