can you use variables with and array....
ok so ive tried doing this but it doesnt seem to work... I'm coding a game and whn i code the output it would be a lot easier just to have a for() statement that would loop until it equaled a certain alue... can this be done.. 2-d array, also it compiles fine but when it gets to the part that it uses the array wih variable my i get a windows error that says program is has stopped working
thanks cj
somthing like this...
Code:
//not actual code
int x;
int y;
array[x][y];
cout<< array[x][y];