1 Star 0 Fork 0

CoderQi/cg初学

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
SeqList.h 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
CoderQi 提交于 2022-12-25 20:48 +08:00 . 1225
#pragma once
#include<stdio.h>
#include<stdlib.h>
//#define N 100//方便更改
//typedef int SLDataType;//将int 重新命名为SLDataType方便更改
////静态顺序表
//typedef struct SeqList
//{
// SLDataType a[N];
// int size;//表示数组中存了多少数据
//}SL;
////各种接口函数
////void SeqListpushback(struct SeqList* ps, int x);
////为了方便后续更新使用typedef即下列这种
//
////静态特点如果满了就不让插入
//void SeqListinit(SL* ps);
//void SeqListpushback(SL* ps, SLDataType x);
//void SeqListpopback(SL* ps);
//void SeqListpushfront(SL* ps, SLDataType x);
typedef int SLDataType;//将int 重新命名为SLDataType方便更改
//动态顺序表
typedef struct SeqList
{
SLDataType *a;
int size;//表示数组中存了多少数据
int capacity;//表示数组的实际能存数据的空间容量多大
}SL;
void Seqlistprint(SL* ps);
//各种接口函数
//void SeqListpushback(struct SeqList* ps, int x);
//为了方便后续更新使用typedef即下列这种
void SeqListinit(SL *ps);
void SeqListdestroy(SL* ps);
void SeqListpushback(SL* ps, SLDataType x);
void SeqListpopback(SL* ps);
void SeqListpushfront(SL* ps, SLDataType x);
void SeqListpopfront(SL* ps);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/programmercg/cg-beginner.git
git@gitee.com:programmercg/cg-beginner.git
programmercg
cg-beginner
cg初学
master

搜索帮助