Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Setting up two dimensional array valuea (http://www.velocityreviews.com/forums/t458894-setting-up-two-dimensional-array-valuea.html)

streamkid@gmail.com 12-01-2006 06:14 PM

Setting up two dimensional array valuea
 
Hello...
i have a two dimensional array of ints,
int board[ 8 ][ 8 ];

when i try to set each element, like that
board[ 7 ][ 7 ] = { blcaslte, blhorse, blbishop, blking, blqueen,
blbishop, blhorse, blcastle,
blpawn, blpawn, blpawn, blpawn, blpawn, blpawn,
blpawn, blpawn,
null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null,
whpawn, whpawn, whpawn, whpawn, whpawn, whpawn,
whpawn, whpawn,
wcastle, whorse, wbishop, wking, wqueen,
wbishop, whhorse, whcastle };

ofc i have enums,
enum pieces { blcaste = 1, blhorse = 2, blbishop = 3, blking = 4,
blqueen = 5, blppawn = 6,
whcaslte = 7, whhorse = 8, whbishop = 9, whqueen = 10,
whking = 11, whpawn = 12,
null = 0 };

but i also tried with this
const int blcaste = 1;
const int blhorse = 2;
etc..

but this didn't work either..

any idea anybodi??


streamkid@gmail.com 12-01-2006 06:18 PM

Re: Setting up two dimensional array valuea
 
just ignore typos, that's not the code, i wrote it to post it because i
don't have the code available atm



All times are GMT. The time now is 08:32 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.