Hi I have trouble with implementing a dynamic two dimensional pointer array on allocating memory for it.
I tried it this way but not sure if it's correct. The array should contain pointers to heap allocated Integer objects
const int size = 10;
Integer *** twoD;
twoD = new Integer**();
for(int i = 0 ; i < size ; i++)
*twoD[i] = new Integer();
for(int j = 0 ; j < size ; j++)
twoD[i][j] = new Integer();
Any help will be appreciated!