Advertisement

Help!!

Started by July 24, 2000 08:08 AM
1 comment, last by cohen1 24 years, 5 months ago
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 <<endl; } } if you have any questions E-Mail me at: cohen.andre@yahoo.com
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=-..
Advertisement
But don''t you mean map[scx][scy]???

"Everything is relative." -- Even in the world of computers.
everything is relative. -- even in the world of computers... so PUSH BEYOND THE LIMITS OF SANITY!

This topic is closed to new replies.

Advertisement