?? linkqueue.h
字號:
/*
* 作者:antigloss
* 最后修改:05-9-7 18:20
* 螞蟻的 C/C++ 標準編程
* cpp.ga-la.com
*/
#ifndef LINKQUEUE_H
#define LINKQUEUE_H
typedef char ElemType;
typedef struct Qnode {
ElemType data;
struct Qnode *next;
} Qnode, *Qptr; /* 隊列結點 */
typedef struct {
Qptr front, rear; /* 隊頭指針,隊尾指針 */
} LinkQueue;
void ClearQueue(LinkQueue *); /* 置為空隊列 */
int DeQueue(LinkQueue *); /* 出隊。成功返回 1 ,失敗返回 0 */
void Destroy(LinkQueue *); /* 銷毀隊列 */
int EnQueue(LinkQueue *, ElemType); /* 插入隊尾。成功返回 1 ,失敗返回 0 */
int GetHead(LinkQueue *, ElemType *);/* 隊列不空則返回隊列頭元素,并返回 1;否則返回 0 */
int InitQueue(LinkQueue *); /* 建立空隊列。成功返回 1 ,失敗返回 0 */
int QueueEmpty(LinkQueue *); /* 若隊列為空隊列,則返回 1 ,否則返回 0 */
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -