## 栈的基本操作和线性表的基本一样,这里介绍两种不同方式的栈的基本操作:
第一种:
对于非空栈,top指针总在base的上一个位置,若空,则top=base
//栈结构体的定义
typedef struct{
SElemType *base; //在构造之和销毁之后,base的值为NULL
SElemType *top; //栈顶指针
int stactsize; //当前已分配的存储空间,以元素为单位
}SqStack;
//构造一个空栈
Status InitStack(SqStack &S){
S.base=(SElemType *)malloc(STACK_INIT_SIZE*sizeof(SElemType));
if(!S.base)
exit(0);
S.top=S.base;
S