stack.h

来自「数据结构课程设计,表达式求值.大家看看,如果功能不好再找我修改」· C头文件 代码 · 共 33 行

H
33
字号
#ifndef STACK_H
#define STACK_H
  
#define TRUE	1
#define FALSE	0
#define OK		1
#define ERROR	0
#define IBFEASIBLE  -1
#define OVERFLOW    -2 

#define MAXLEN  20
#define MAXSIZE 20

#define STACK_INIT_SIZE 100;
#define STACKINCREMENT  10;
typedef	int	Status;
typedef char SElemType; 

typedef struct
{
	SElemType *base;
	SElemType *top;
	int stacksize;
}SqStack;

Status InitStack( SqStack &S );
Status StackEmpty( SqStack S );
//Status Top( SqStack S, SElemType &e );
Status Push( SqStack &S, SElemType e );
Status Pop( SqStack &S, SElemType &e );
SElemType Top( SqStack S );

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?