I've been looking everywhere and I can't seem to find the correct syntax. This is what I have thus far.
int width;
int height;
int maxgrey;
int **dimensions;
//...read in height and width from file
dimensions = new int *[ width ][ height ];
I've been looking everywhere and I can't seem to find the correct syntax. This is what I have thus far.
int width;
int height;
int maxgrey;
int **dimensions;
//...read in height and width from file
dimensions = new int *[ width ][ height ];
int width;
int height;
int **dimensions;
//...
dimensions = new int *[height];
for ( int i = 0; i < height; i++ ) dimensions[i] = new int[width];