to delete all the nodes of a binary search tree (using the 'post order traversal") i have used the following coding...
even though it does delete all the nodes of the binary search tree, it gives an error at the end...
so i want to know if my coding is correct..
void tree::deleteAll(Node* localRoot)
{
if(localRoot !=NULL)
{
deleteAll(localRoot->leftChild);
deleteAll(localRoot->rightChild);
delete localRoot;
}
}