BiThrTree IPostPretNode(BiThrTree head,BiThrTree p) {/*在中序线索二叉树上寻找结点p 的先序的后继结点,head 为线索树的头结点*/ BiThrTree pre; if ( p->rtag==0 ) pre=p->rchild; else { pre=p; while ( pre->ltag==1&& post->rchild!=head ) pre=pre->lchild; pre=pre->lchild; } return ( pre ); }