Here is a solution using pointers.
int rows=2, cols=3, cntr=0, *array1D, **array2D;
array1D = new int[rows*cols];
array2D = new int*[rows];
for (int k=0; k<rows; k++) array2D[k] = array1D+k*cols;
for (int i=0; i<rows; i++) for (int j=0; j<cols; j++) array2D[j] = cntr++;
cout << "\n1-by-" << rows*cols << " 1D array :\n[";
for (int k=0; k<(rows*cols); k++) cout << array1D[k] << " ";cout << "\n";
cout << "\n" << rows << "-by-" << cols << " 2D array: \n[";
for (int i=0; i<rows; i++) {for (int j=0; j<cols; j++) cout << array2D[j] << " ";cout << "]\n ";}
delete[] array2D;
delete[] array1D;
If you want to try with 3D array then it would be as follows.
int bands=2, rows=2, cols=3, cntr=0, *array1D, **array2D, ***array3D;
array1D = new int[bands*rows*cols];
array2D = new int*[bands*rows];
array3D = new int**[bands];
for (int k=0; k<bands; k++) for (int i=0; i<rows; i++) array2D[k*rows+i] = array1D+(k*rows+i)*cols;
for (int k=0; k<bands; k++) array3D[k] = array2D+k*rows;
for (int k=0; k<(bands*rows*cols); k++) array1D[k]=cntr++;
cout << "\n1-by-" << rows*cols*bands << " 1D array :\n[";
for (int k=0; k<(rows*cols*bands); k++) cout << array1D[k] << " ";cout << "\n";
cout << "\n" << bands << "-by-" << rows << "-by-" << cols << " 3D array: \n";
for (int k=0; k<bands; k++) {
cout << "\nBand[" << k << "]\n[";
for (int i=0; i<rows; i++) {for (int j=0; j<cols; j++) cout << array3D[k][j] << "\t";cout << "]\n ";}
}
delete[] array3D;
delete[] array2D;
delete[] array1D;