hello.. I've implemented a function to display an avl tree after inserting nodes into it like this
template<class nodetype>
void AVLtree<nodetype>::display() const
{
display(Proot);
}
template<class nodetype>
void AVLtree<nodetype>::display(Node<nodetype> * ptr) const
{
if(ptr==0)
return ;
cout<<ptr->value<<" ";
display(ptr->Pleft);
display(ptr->Pright);
}
after compiling,there were no errors ,the program worked but nothing were printed on the screen
help me please....!! thanks