数据结构顺序栈

时间:2016-12-17 17:17:15
【文件属性】:

文件名称:数据结构顺序栈

文件大小:2KB

文件格式:TXT

更新时间:2016-12-17 17:17:15

顺序栈

#include<stdio h> #include<stdlib h> #define STACK INIT SIZE 5 #define STACKINCREMENT 3 #define OVERFLOW 2 #define OK 1 typedef int SElemType; typedef int Status; typedef struct { SElemType base; SElemType top; int stacksize; }SqStack; Status InitStack SqStack &S { S base SElemType malloc STACK INIT SIZE sizeof SElemType ; if S base exit OVERFLOW ; S top S base; S stacksize STACK INIT SIZE; return OK; } Status a SqStack &S ">#include<stdio h> #include<stdlib h> #define STACK INIT SIZE 5 #define STACKINCREMENT 3 #define OVERFLOW 2 #define OK 1 typedef int SElemType; typedef int Status; typedef struct { SElemType base; SElemType top; int stacksize; }SqStack; Status InitStack SqStack &S { S ba [更多]


网友评论