在一本参考书里看到下面的算法,可是本人很久没弄C++了,不知道怎样改才能在VC++里通过编译啊。明天就要上机实习了,哪位大虾能帮帮小弟啊?

#define maxsize 100
typedef struct
{
  Bitree Elem[maxsize];
  int top;
}SqStack;

void PreOrderUnrec(Bitree t)
{
  SqStack s;
  StackInit(s);
  p=t;
  
  while (p!=null || !StackEmpty(s))
  {
    while (p!=null)       //遍历左子树
    {
      visite(p->data);
      push(s,p);
      p=p->lchild;    
    }//endwhile
    
    if (!StackEmpty(s))     //通过下一次循环中的内嵌while实现右子树遍历
    {
      p=pop(s);
      p=p->rchild;    
    }//endif
        
  }//endwhile 
  
}//PreOrderUnrec