c++ int** what is it and what does it do and why would i use it and a good reference reading on the subject
easy question
what is int** doing have been looking for it on the net and have not found it any were.
is this a pointer to a pointer or some thing like that
int height = 15; int width = 10; int** my2DArray = create2DArray(height, width); printf("Array sized [%i,%i] created.\n\n", height, width);
int** create2DArray(unsigned height, unsigned width) { int** array2D = 0; array2D = new int*[height]; for (int h = 0; h < height; h++) { array2D[h] = new int[width]; for (int w = 0; w < width; w++) { // fill in some initial values // (filling in zeros would be more logic, but this is just for the example) array2D[h][w] = w + width * h; } } return array2D; }