Can someone explain to me why I'm getting these two errors? I think it's within the initialization of the 2D arrays. MyInt is a class using dynamic allocation to create an array of single digit integers.
Error in line 5: const MyInt &y expression must have a constant value
Error in line 11: expression must have pointer to object type
int main(){
//
//int **p = new int [5][10]; <---- Can't do this
//
// Can do
int **p = newint*[5];
for ( int i(0); i<5;i++)
p[i] = newint[10];
for ( int i(0); i<5;i++)
delete [] p[i];
delete [] p;
}