summaryrefslogtreecommitdiff
path: root/c/dataStructure/栈和队列/队列/循环队列/queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/dataStructure/栈和队列/队列/循环队列/queue.h')
-rwxr-xr-xc/dataStructure/栈和队列/队列/循环队列/queue.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/c/dataStructure/栈和队列/队列/循环队列/queue.h b/c/dataStructure/栈和队列/队列/循环队列/queue.h
new file mode 100755
index 0000000..11806b5
--- /dev/null
+++ b/c/dataStructure/栈和队列/队列/循环队列/queue.h
@@ -0,0 +1,17 @@
+#include<stdio.h>
+#include<stdlib.h>
+#include<stdbool.h>
+
+#define MAXSIZE 5
+
+typedef struct queue {
+ int * base;
+ int front;
+ int rear;
+} Queue;
+
+bool InitQueue (Queue * q);
+bool EnQueue (Queue * q, int e);
+bool DeQueue (Queue * q, int * e);
+int LengthQueue (Queue * q);
+int GetHead (Queue * q); \ No newline at end of file