Reputation: 43
bool **arr=new bool* [row];
for(int i=0; i<9; i++)
{
arr[i]= new bool[column];
}
I want to delete this dynamic array because it cause a problem with my RAM.
Upvotes: 1
Views: 2610
Reputation: 1
You just delete in the reverse order it was allocated:
for(int i=0; i<9; i++) {
delete [] arr[i];
}
delete[] arr;
Upvotes: 5