Hello, I have a array of double pointers as shown below
dummy_class **ptr[10] ; //assume dummy class to be some c++ class
I have allocated it like this:
for(int i = 0 ; i<10 ; i++)
{
ptr[i] = new dummy_class* [5] ;
for(int j=0 ; j<5 ; j++) // This 5 is because of previous
allocation of 5
{
ptr[i][j] = new dummy_class ;
}
}
1. Whether the above allocation is valid
2. How will be delete statements for this.