栈的基本操作c语言.docVIP

  • 1
  • 0
  • 约3.37千字
  • 约 5页
  • 2019-12-22 发布于浙江
  • 举报
#include stdlib.h #include stdio.h #include iomanip.h //函数结果状态代码 #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLE -1 #define OVERFLOW -2 //Status 是函数的类型,其值是函数结果状态代码 typedef int Status; typedef int SetElemType; typedef SetElemType ElemType; #include tou.h #include stdio.h #include malloc.h typedef char SElemType; // 栈的元素类型 #define STACK_INIT_SIZE 100 // 存储空间初始分配量 #define STACKINCREMENT 10 // 存储空间分配增量 // 栈的顺序存储表示 P46 typedef struct SqStack { SElemType *base; // 在栈构造之前和销毁之后,base的值为NULL SElemType *top; // 栈顶指针

文档评论(0)

1亿VIP精品文档

相关文档