int **map;*map = new (int *)[10];for (int i=0 ; i<10 ; i++){map = new int[10];}
But then for some reason I *CAN* access the data one by one like this:
map[2][3] = 4;
But I can't access it with a loop like this:
for (int i=0 ; i<10 ; i++){map[2] = 3;}
Perhaps the most strange thing is that my compiler tells me that the program is crashing when I declare
*map = new (int *)[10]
.I think that my compiler is trying to optimise things by putting all the loops together or something but the end result is pretty buggered!
Anyone know what is happening?
wise_guy
Edited by - wise_guy on June 13, 2000 9:13:04 PM
Edited by - wise_Guy on June 13, 2000 9:14:31 PM