can anyone tell me if this would be the correct code or have suggestions for improvement?
stack <tnode*> st;
cout << "Post-order traversal: ";
p=root;
while(p!=0)
{
while(p->Llink != 0)
{
s.push(p);
p = p->Llink;
}//end while
cout << p->data << " ";
while(p->Rlink != 0)
{
cout << p->data << " ";
p = s.top();
s.pop();
}//end while
if (p->Rlink != 0)
p = p->Rlink;
else p = 0;
}//end while