#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
#define STACK_INIT_SIZE 100
#define STACKINCREMENT 10
#include <iostream>
typedef int Status;
using namespace std;
int arry[61];
int c;
/*
栈结构定义及实现
*/
typedef char SElemType;
typedef struct {
SElemType *base;
SElemType *top;
int stacksize;
}SqStack;
SqStack S;
//初始化
int InitStack()
{
S.base=(SElemType *)malloc(STACK_INIT_SIZE*sizeof(SElemType));
if (!S.base)exit(OVERFLOW);
S.top=S.base;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余3页未读,立即下载