A phantom declaration?....

1>c:\documents and settings\cplusplus\my documents\visual studio 2010\projects\program\program\program.cpp(10): error C2369: 'Map' : redefinition; different subscripts

1> c:\documents and settings\cplusplus\my documents\visual studio 2010\projects\program\program\game_functions.h(7) : see declaration of 'Map'


This happened when I moved the declaration of the char array 'Map' to the main body and deleted the game_functions.h file. the compiler says it still exists and is still declared there?...
Can you post both lines? (line 10 of program.cpp and line 7 of game_functions.h)
1
2
3
4
5
6
7
8
9
10
11
Char Map[12][12]= {{"+---------+"},
                                 {"|             |"},
                                 {"|             |"},
                                 {"|             |"},
                                 {"|             |"},
                                 {"|             |"},
                                 {"|             |"},
                                 {"|             |"},
                                 {"|             |"},
                                 {"|             |"},
                                 {"+---------+"}};


Is line 10 of the main program. The point is, line 7 of 'game_functions.h' doesn't exist. I deleted that header file. Yet it still presents this error.
Wow, me trying to make it look nice, did not work. XD
Hi Hilo890, I noticed that in many of your posts you are not including all of your code. Please remember to do so otherwise you leave us guessing and delay help. As far as your errors, you must have another Map variable present. Please post all of your code for us to review.
Last edited on
Well, a lot of it doesn't seem to ever matter, so I just don't want to burden you all with it, considering it can be quite lengthy. But I fixed it... By destroying the project and copying the code to a new one...
Are you using Visual C++ Express? Remember to delete the file, not just remove it from the project.
Topic archived. No new replies allowed.