Hi,
I have been working on allocating and deleting multi-dimensional arrays...
I gather that to delete a 2D array correctly, you need to do the following:
for (int a = thisFirstElemen t; a < totalFirstEleme nts; a++)
{
delete[] blabla[a];
}
But how would I delete a 3D array? Would it just be delete[][] blabla[a] or am I missing something?
Thanks,
Crispin
I have been working on allocating and deleting multi-dimensional arrays...
I gather that to delete a 2D array correctly, you need to do the following:
for (int a = thisFirstElemen t; a < totalFirstEleme nts; a++)
{
delete[] blabla[a];
}
But how would I delete a 3D array? Would it just be delete[][] blabla[a] or am I missing something?
Thanks,
Crispin
Comment