Here is my code for traversals. I have preorder and inorder working. However, I can't get my postorder to print out more than the first digit. Any help will be much appreciated.
// * * * * Traversal begins * * * * //
cout << "The tree traversed INORDER is" << "\n";
p = root;
do
{
while (p != nil)
{
ptrstack.push(*p);
p = (*p).left;
}
if (!(ptrstack.empty_stack()))
{
ptrstack.pop(numb);
p = numb.right;
cout << (numb).info << "\n";
}