• Advertisement

Archived

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

Help!!

This topic is 6420 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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

  • Advertisement