- May 18, 2001
- 7,849
- 339
- 126
Suppose I have an integer array, defined thus:
int nPattern[8][3];
It seems like there is an easy way to initialize this array, like so:
nPattern = {{0,0,0}, {1,0,0}, {0,1,0}, {0,0,1}, {1,1,0}, {1,0,1}, {0,1,1}, {1,1,1}};
But this doesn't work (syntax error}. I've used so many different languages lately that I've forgotten how to do this in my "native" language. Is there an easy way to do this?
Help??!?!?!???!!!
int nPattern[8][3];
It seems like there is an easy way to initialize this array, like so:
nPattern = {{0,0,0}, {1,0,0}, {0,1,0}, {0,0,1}, {1,1,0}, {1,0,1}, {0,1,1}, {1,1,1}};
But this doesn't work (syntax error}. I've used so many different languages lately that I've forgotten how to do this in my "native" language. Is there an easy way to do this?
Help??!?!?!???!!!