I am trying to add a highscores table to my game using the pocket high scores system. ()
The constructor to create an instance of the CHighScores class is as follows:
CHighScores(int nMaxScores, LPCTSTR pszMagic)
I am trying to create this as a global variable of type CHighScores in my header file and use the code below to do this:
CHighScores hs(10,TEXT("TESTSTRING"));
When I compile I get the following error message:
error C2059: synatx error : 'constant'
The exact same code works fine when the CHighScores variable is declared locally within a function but following the suggestions from the authors of the library and to be able to access it from anywhere within my game, I would like to be able to make it a global variable.
Having done various searches I have failed to find an explanation of this error and being quite new to c++ I have no idea what it means. Any help would be gratefully received!!
Thanks in advance.