?? seqlist.h
字號:
#ifndef SEQLIST_H
#define SEQLIST_H
const int List_Init_Size=100;
const int ListIncrement=10;
typedef int ElemType;
const int EndMark=0;
typedef struct
{
ElemType* elem;//存儲空間基址
int length;//當前長度
int listsize; //當前分配的存儲容量(以sizeof(ElemType)為單位)
} Sqlist;
void InitList_sq(Sqlist& l);//構建一個鏈表
void DestroyList_sq(Sqlist& l);//銷毀
void ClearList_sq(Sqlist& l);//清空
bool ListEmpty_sq(Sqlist l);
int ListLength_sq(Sqlist l);//鏈表長度
void GetElem_sq(Sqlist l, int i, ElemType& e);//取鏈表中的一元素
int LocateElem_sq(Sqlist l, ElemType e);//找一個為e的元素
void PriorElem_sq(Sqlist l, ElemType cur_e, ElemType& Pre_e);//前驅
void NextElem_sq(Sqlist l, ElemType cur_e, ElemType& Next_e);//后繼
void ListInsert_sq(Sqlist& l, int i, ElemType e);//插入
void ListDelete_sq(Sqlist&l, int i, ElemType& e);//刪除
void ListTraverse (Sqlist L);//
bool compare(ElemType x,ElemType y);//比較
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -