Setting up two dimensional array valuea

S

streamkid

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??
 
S

streamkid

just ignore typos, that's not the code, i wrote it to post it because i
don't have the code available atm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top