Check out example codes for "declaring 2d dynamic array c++". It will help you in understanding the concepts better.
Code Example 1
int** arr = new int*; // Number of Students int i=0, j; for (i; i<10; i++) arr[i] = new int; // Number of Courses /*In line, you're creating an array which can store the addresses of 10 arrays. In line, you're allocating memories for the array addresses you've stored in the array 'arr'. So it comes out to be a 10 x 5 array. */
Code Example 2
int** a = new int*[rowCount]; for(int i = 0; i < rowCount; ++i) a[i] = new int[colCount];
Learn ReactJs, React Native from akashmittal.com