代码如下int Pre3(BiTree T)
{
    
    p=T;
    SqStack s;
    InitStack(s);
    while(p||!StackEmpty(s))
    {
        while(p!=null)
        {
            visit(p->ch);
            push(s,p);
            p=p->lchild;
        }
        if(!StackEmpty(s))
        {
            p=pop(s);
            p=p->rchild;
        }
    }
}