1.typedef struct stack2//这里的名字不能和元素名重复{ int stack[maxsize]; int top; }sqstack; 2.void main() { int x,y; s=new sqstack ;//s 需要分配空间,并初始化大小,s->top=0;//push(s,3); push(s,2); x=pop(s); y=pop(s); printf("%d%d",x,y); delete s;//并记得释放资源}