1 Star 0 Fork 0

绽风华 / code

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
SqStack.h 552 Bytes
一键复制 编辑 原始数据 按行查看 历史
绽风华 提交于 2023-10-05 14:30 . 数据结构——顺序栈
#pragma once
#include<stdio.h>
#include <stdlib.h>
#include"../DataStructure/Person.h"
typedef Person SElemType;
//------顺序栈的存储结构-------------
#define MAXSIZE 100 //顺序栈存储空间的初始分配量
typedef struct {
SElemType* base; //栈底指针
SElemType* top; //栈顶指针
int stacksize;
}SqStack;
//顺序栈的初始化
bool InitStack(SqStack& S);
//顺序栈的入栈
bool Push(SqStack& S, SElemType e);
//顺序栈的出栈
bool Pop(SqStack& S, SElemType& e);
//取顺序栈的栈顶元素
SElemType GetTop(SqStack S);
//顺序栈判空
bool StackEmpty(SqStack S);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cmwlvip/code_test.git
git@gitee.com:cmwlvip/code_test.git
cmwlvip
code_test
code
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891