Jump to content
  • Advertisement

Archived

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

cohen1

Another error

This topic is 6512 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

Ok, I took of the ''*'' of the three stament but now I get this error: error C2446: ''=='' : no conversion from ''const int'' to ''char (*)[10]''

Share this post


Link to post
Share on other sites
Advertisement
Here is what the code should look like:

        
#include <iostream.h>

void main()
{
unsigned 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[scy][scx] == 0)
cout << " ";
if (map[scy][scx] == 1)
cout << "1";
if (map[scy][scx] == 2)
cout << endl;
}
}
}


This should work fine!

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

..-=gLaDiAtOr=-..

Edited by - Gladiator on July 24, 2000 12:54:33 PM

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Gladiator

if (map[scx][scy] == 0)



you probably want to have it be map[scy][scx] too, to get your desired coordinates. But that all depends on your mapping preference.

Lep

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!