I\'ve tried looking but I haven\'t found anything with a definitive answer. I know my problem can\'t be that hard. Maybe it\'s just that I\'m tired..
Basically, I wa
I suggest using a far simpler method than an array of arrays:
#define WIDTH 3
#define HEIGHT 4
int* array = new int[WIDTH*HEIGHT];
int x=1, y=2, cell;
cell = array[x+WIDTH*y];
I think this is a better approach than an array of an array, as there is far less allocation. You could even write a helper macro:
#define INDEX(x,y) ((x)+(WIDTH*(y)))
int cell = array[INDEX(2,3)];