No, I'm sure you don't have to post *everything*.
Sorry, I assumed the compiler would give at least somewhat of a better error message. I overestimated :P... I'm not that knowledgeable of Turbo-C++, by the way. But still figured I'd reply because I doubt you'd get a timely solution either way.
I'm not seeing anything immediately wrong with what you've posted. 'Declaration syntax error' can apparently mean a variety of different problems, but it seems most likely that it means you missed a semi-colon or comma or something, or otherwise incorrectly declared a variable. Or, it could be a mismatched {, }, #if, #ifndef, #endif, etc.
Can you show the lines around where you declare your map object?
Also, where you define your actual g_map (not just the extern declaration).
Unrelated, but on line 9
int indexX = 0, indexY = 0;
Maybe you already know this, but these variables have nothing to do with your class variables.
_____________________________
Furthermore, I want to re-iterate: You said you had a lot of lines of code. I sincerely suggest making a new project (so you don't screw up what you currently have), copying your current code into it, moving all your code into one file, and
remove all irrelevant logic and lines of code that don't affect the appearance of your error message. This will immensely help narrow down the issue.
Remove some lines of code, try to compile. Remove some lines of code, try to compile. etc, etc.
If I'm correct, you should be able to whittle down your program to just be two dozen or so lines.
EDIT: I saw your other post
And i tried with a small sample program, same error... |
Post the sample program, please.