summaryrefslogtreecommitdiff
path: root/c/dataStructure/栈和队列/队列/链队列/queue.h
diff options
context:
space:
mode:
authorgarhve <git@garhve.com>2022-12-05 19:43:39 +0800
committergarhve <git@garhve.com>2022-12-05 19:43:39 +0800
commitc6bc541ab58363d783e60a007e80e9bf9e231fda (patch)
treea59c7ed0d05225c5876f3e5e919d4f6ed0c447ff /c/dataStructure/栈和队列/队列/链队列/queue.h
initialize
Diffstat (limited to 'c/dataStructure/栈和队列/队列/链队列/queue.h')
-rwxr-xr-xc/dataStructure/栈和队列/队列/链队列/queue.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/c/dataStructure/栈和队列/队列/链队列/queue.h b/c/dataStructure/栈和队列/队列/链队列/queue.h
new file mode 100755
index 0000000..e444632
--- /dev/null
+++ b/c/dataStructure/栈和队列/队列/链队列/queue.h
@@ -0,0 +1,23 @@
+#ifndef _QUEUE_H
+#define _QUEUE_H
+
+#include<stdio.h>
+#include<stdlib.h>
+#include<stdbool.h>
+
+typedef char ElemType;
+
+typedef struct queue {
+ ElemType data;
+ struct queue * next;
+} Queue;
+typedef Queue * pqueue;
+
+void InitQueue (pqueue * q);
+bool EnQueue (pqueue * qtail, ElemType * e);
+bool DeQueue (pqueue * qhead, ElemType * e);
+bool RsQueue (pqueue * qhead);
+bool EmptyQueue (pqueue * qhead);
+bool PrintQueue (pqueue * qhead);
+
+#endif