#include <iostream>
#include <stdio.h>
#include <malloc.h>
using namespace std;
#define OK 1
#define ERROR 0
#define OVERFLOW -2
#define MAXSIZE 100
#define exit
typedef char ElemType;
typedef struct
{
ElemType* base;//栈底指针
ElemType* top;//栈顶指针
int stacksize;//栈可用的最大容量
} SqStack;
void InitStack(SqStack& S)
{
//构造一个空栈S
S.base = new ElemType
顺序栈//输入输出
最新推荐文章于 2023-04-14 09:35:40 发布
![](https://img-home.csdnimg.cn/images/20240611030827.png)