#include <stdio.h> #include<stdlib.h> #define max 100 typedef struct Tree{ int data; struct Tree *lchild; struct Tree *rchild; int ltag,rtag; } *tree,sree; typedef struct node{ tree data[max]; int top; }*list,List; list Init() { list s=(list)malloc(sizeof (List)); if(s) s->top=-1; return s; } int Empty(list s){ if(s->top==-1) return 1; else { return 0; } } void push(list s,tree t) { if(s->top==max-1) printf("栈满"); else { s->top++; s->data[s->top]=t; } } void pop(list s,tree *t){ if(Empty(s)) printf("栈空"); *t=s->data[s->top]; s->top--; } void Treeinit(tree *t,char *str ,int *x) { char ch; ch=*(str+*x); *x=*x+1; if(ch!='#'){ *t=(tree)malloc(sizeof (sree)); (*t)->data=