摘要: 下图表示顺序栈中数据元素和栈指针之间的对应关系#include#include#define SIZE 100 //栈的最大长度#define STEPTSIZE 10 //栈每次增长的长度typedef char ElemType;/*栈的定义*/typedef struct stack{ ElemType *base; ElemType *top; int stackSize;}stack;/*栈顶初始化*/void initAStack(stack *s){ s->base =(ElemType *)malloc(SIZE*sizeof(Ele... 阅读全文
posted @ 2013-10-08 11:53 EyesFront 阅读(774) 评论(0) 推荐(0) 编辑