Creating dynamic 2D array in C++. of size X and Y.
int X = n+1; int Y = W+1; int** arr = new int* [X]; for(int i = 0; i <= n; ++i) { arr[i] = new int[Y