How do I deallocate this type of 3D array in c++? I have a class that has a int*** volume as a member and I filled it this way..
volume = new int**[xSize];
for(int i =0; i<xSize; i++)
{
volume[i] = new int*[ySize];
for(int j =0; j<ySize; j++)
{
volume[i][j] = new int[zSize];
for(int k = 0; k<zSize;k++)
{
volume[i][j][k] = 0;
}
}
}
You just reverse your actions (other than the filling of the array)