在这里插入代码片
#include "stdio.h"
#include "malloc.h"
#define max 100
typedef struct{
int *base;//栈底
int *top;//栈顶
int length;
}stack;
void init(stack *s){
s->base=(int
顺序栈的入栈和出栈
最新推荐文章于 2023-11-25 16:32:43 发布
在这里插入代码片
#include "stdio.h"
#include "malloc.h"
#define max 100
typedef struct{
int *base;//栈底
int *top;//栈顶
int length;
}stack;
void init(stack *s){
s->base=(int