(WinXP, Borland C++ Free Command Line Compiler)
Ok, I'm trying to initialize my game based off a 2d array. (25x80). I would rather not have to initialize every peice like
Code:
Map[0][0] = 0;
Map[0][1] = 0;
...
Map[18][3] = 1;
I realize I will have to type in each array value by hand, but its there any way to initialize the array like:
Code:
int main() {
int Map[25][80] = { 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0, ect}
When I try to compile that, my compiler goes nuts, so I guess I'm either doing some wrong, or that type of initializing an array is impossible?
And my second question;
So far, I have been using getch() to detect for arrow keys. However, as I start using more advance code, getch() isint really working. What I'm trying to do is detect for multiple arrows/keys. So when I hold down the up and down arrow, it doesnt detect only the one I presses first. Not sure, but I dont think getch() is capable of this.
Well thank you again for your help!