#define Maxsize 100
typedef int elemtype;//这里要价格逗号
typedef struct
{
elemtype elem[Maxsize];
int top;
}sqstacktp;
void Ini_Sqstack(sqstacktp *s)
{
//将顺序栈s置为空
s->top = 0;
}
int empty_sqstack(sqstacktp *s)
{
//判断栈是否为空
if(s->top>0)
return(0) ;
else
return(1) ;
}
/*void Push_Sqstack(sqstacktp *s , elemtype x)
{
//若栈s未满,将元素x压入栈中;否则,栈的状态不变并给出出错信息
if(s->top == Maxsize)
printf("Overflow");
else
{
typedef int elemtype;//这里要价格逗号
typedef struct
{
elemtype elem[Maxsize];
int top;
}sqstacktp;
void Ini_Sqstack(sqstacktp *s)
{
//将顺序栈s置为空
s->top = 0;
}
int empty_sqstack(sqstacktp *s)
{
//判断栈是否为空
if(s->top>0)
return(0) ;
else
return(1) ;
}
/*void Push_Sqstack(sqstacktp *s , elemtype x)
{
//若栈s未满,将元素x压入栈中;否则,栈的状态不变并给出出错信息
if(s->top == Maxsize)
printf("Overflow");
else
{