摘要: #include using namespace std;#define MAXSIZE 256typedef struct stack{ int top; int stack[MAXSIZE];}Stack;void initStack(Stack *s){ s->top=0;}void push(Stack *s,int elem){ if(s->top>MAXSIZE) couttop++; s->stack[s->top]=elem;}void pop(Stack *s){ if(s->toptop--;}int max(Stac... 阅读全文
posted @ 2013-10-11 21:37 xshang 阅读(1217) 评论(0) 推荐(0) 编辑