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=-..
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=-..
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement