https://stackoverflow.com/a/936702/462608
A dynamic 2D array is basically an array of pointers to arrays.
How do I declare a 2d array in C++ using new?
Oh my God, this is complete garbage, this is utterly wrong. This is no 2D array. "A dynamic 2D array is basically an array of pointers to arrays." – NOOOO, FFS! T (*ptr)[M] = new T[N][M]; is the correct solution… No amount of arrays-of-pointers will ever be the same as an array-of-arrays
new int*[rowCount];
.
What does star indicate there?
Is a 2D array an array of pointers to array?