Is it appropriate to call dynamic multidimesional array, an array of arrays?
int **mp = 0;
// Create an array of pointers
mp = new int*[6];
// Where each element of type pointer, points to dynamic array.
for (int x = 0; x < 6; x++)
mp[x] = new int[7];
Looking at this, I would say they are array of pointers pointing to arrays of size 7 ints.
But are dynamic arrays even considered arrays or just a chuck of memory returned by pointer?
If I understand correctly, your question is about semantics. As far as the standard is concerned,
new []does create an array, but returns a pointer to the first element. From 5.3.4/5 of the standard:So in your case, what we colloquially call “an array of arrays” is really an array of pointers, which is distinct from e.g.
int x[6][6], which is truly an array of arrays.