mardi 5 juin 2018

What happens during delete of array of pointers in this case?

If i define array in the next way:
char** array=new char*[3];
and I initialize the array like that for example:

for(int i=0; i<3;i++){  
array[i]=new char[5];  
}  

and after that, I doing:

delete[] array;  

What happens during the delete?

Aucun commentaire:

Enregistrer un commentaire