Here's what I have so far
template <class KT, class DT>
void my_bst<KT,DT>::show_bst_structure(my_bst_node<KT,DT>*& p) const
{
my_bst_node<KT,DT>* le=NULL;
my_bst_node<KT,DT>* ri=NULL;
//empty tree
if(p==NULL)
{
cout<<"tree is empty\n";
}
else
{
//print node key
cout<<p->data<<endl;
if(p->left!=NULL&&p->right!=NULL)
{
show_bst_structure(p->left);
}
else if(p->left!=NULL)
{
cout<<"enter left\n";
le=p->left;
show_bst_structure(le);
}
else if(p->right!=NULL)
{
cout<<"enter right\n";
show_bst_structure(ri->right);
}
}
}