Archived

This topic is now archived and is closed to further replies.

cohen1

Help!!

Recommended Posts

I have writen this code in Visual C++ 6 and I get the following error: error C2059: syntax error : ''['' And here is my code: #include void main() { char map[10][10]= { {1,1,1,1,1,1,1,1,1,2}, {1,0,0,0,0,0,0,0,1,2}, {1,0,0,0,0,0,0,0,1,2}, {1,0,0,0,0,0,0,0,1,2}, {1,0,0,0,0,0,0,0,1,2}, {1,0,0,0,0,0,0,0,1,2}, {1,0,0,0,0,0,0,0,1,2}, {1,0,0,0,0,0,0,0,1,2}, {1,0,0,0,0,0,0,0,1,2}, {1,1,1,1,1,1,1,1,1,2} }; for (int scx=0; scx<=10; scx++) for (int scy=0; scy<=10; scy++) { if (map* [10][10] ==0) cout <<" "; if (map* [10][10] ==1) cout <<"1"; if (map* [10][10] ==2) cout <

Share this post


Link to post
Share on other sites
cohen1, you can''t use "map* [10][10]" instead you should use "map[10][10]"

Note: There is no star after map! That goes for all three statements that you have, no stars after map!

-------------------------------
That's just my 200 bucks' worth!

..-=gLaDiAtOr=-..

Share this post


Link to post
Share on other sites