MergeSort Desructor

How can I use "delete[]" on all pointers on the stack, using a mixture of top and pop functions or variables
use delete[] for all elements you used new ...[...]. If you didn't don't us delete[]
1
2
3
4
5
6
7
while( notEmpty() ) {
   topNode = top();
   pop();
   delete topNode;
}

delete tree;
Topic archived. No new replies allowed.