【保存2】

include <stdio.h>

include <stdlib.h>

typedef int Selemtype;

define TURE 1

define FALSE 0

define STACK_INIT_SIZE 100

define STACKINCREMENT 10

/---栈的顺序存储结构(动态)---/

typedef struct
{
Selemtype *base;
Selemtype *top;
int Stacksize;

}SeqStack;

/---栈的初始化---/

int InitStack(SeqStack *s)
{
s->base = (SeqStack *)malloc(sizeof(SeqStack))
if(!s->base) printf("完犊草子");
else
{
s->top = s->base;
s->Stacksize = STACK_INIT_SIZE;
}
return TURE;
}

/---判断栈是否为空---/

int IsEmpty(SeqStack *s)
{
if(s->top == s->base)
return TURE;
else
return FALSE;
}

int Push()

上一篇:Unity ShaderLab 语法基础一


下一篇:Python-练习之电影院订票系统