Copy the content of a 2d array into a new 2d array but allocate the size of the new array dynamically by using the ‘new’ operator in c++. code example
Example: how to make a n*n 2d dynamic array in c++
int** a = new int*[rowCount];
for(int i = 0; i < rowCount; ++i)
a[i] = new int[colCount];