/*
* 手写数组,实现“判断数组状态”,“追加”,“插入”,“删除”
* @Bight
* 2020年2月8日
*/
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
typedef struct Add{
int * pBase;
int len;
int cnt;
}Arr;
void show_arr(Add * pArr);
void init_arr(Add * pArr, int length);//初始化数组
bool is_empty(Add * pArr);//判断为空
bool is_full(Add * pArr);//判断为满
bool insert_arr(Add * pArr, int pos, int val); //插入
bool addition_arr(Add * pArr, int val);
bool delete_arr(Add * pArr, int pos , int * pVal);
int main()
手写数组
最新推荐文章于 2022-03-22 16:55:10 发布