参考学习一下
来研究研究
支持小甲鱼~\(≧▽≦)/~
我想看看内容
哦
#include<stdio.h>
#include<stdlib.h>
#define SGFHDF 50
#define FHHGJG 10
typedef char ElemType;
typedef struct
{
ElemType *base;
ElemType *top;
int stackSize;
}sqStack;
void InitStack(sqStack *s)
{
s->base=(ElemType *)malloc(STACK_INIT_SIZE * sizeof(ElemType));
if(!s->base)
{
exit(0);
}
s->top=s->base;
s->stackSize=STACK_INIT_SIZE;
}
void push(sqStack *s,ElemType e)
{
if(s->top-s->base>=s->stackSize)
{
s->base=(ElemType *)realloc(s->base,(s->stackSize+SATCKINCREMENT) * sizeof(ElemType));
if(!s->base)
{
exit(0);
}
s->top=s->base+s->stackSize;
s->stackSize=s->stackSize+SATCKINCREMENT;
}
*(s->top)=e;
s->top++;
}
void Pop(sqStack *s,ElemType *e)
{
if(s->top==s->base)
{
return ;
}
*e=*--(s->top);
}
int StackLen(sqStack s)
{
return (s.top-s.base);
}
main()
{
}
小甲鱼,你真好
学习学习
ghh
嗯嗯
爽
烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦发
围观围观
正好是布置的作业啊!!!!要看要看1!!
看一下代码是什么
不错
围观大神{:5_92:}
支持一下
看看
强烈支持楼主ing!!!!