Another error
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]''
Here is what the code should look like:
This should work fine!
-------------------------------
That's just my 200 bucks' worth!
..-=gLaDiAtOr=-..
Edited by - Gladiator on July 24, 2000 12:54:33 PM
#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
July 24, 2000 11:41 AM
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement