#include<iostream>
#include<malloc.h>
#define STACKINITSIZE 100
#define STACKINCREMEMT 10
using namespace std;
typedef struct{
int *base; //动态存储空间的基地址,栈底
int *top; //栈顶指针,指向真实栈元素的下一个位置
int stacksize;
}Sqstack;
void InitStack(Sqstack &S){
//创建动态空间
S.base = (int *)malloc(STACKINITSIZE * sizeof(int));
S.top = S.base;
S.stacksize = STACKINITSIZE;
}
int StackNull(Sqstack &S){
//判断栈是否为空
if(S.base == S.top){
return 0;
}else