From d07f3aeba4dbd96068f4124eabcec3d17abb20b8 Mon Sep 17 00:00:00 2001 From: ParkMoonJ Date: Fri, 9 Apr 2021 13:49:14 +0800 Subject: [PATCH] Create queue.cpp --- 3 栈和队列/queue.cpp | 17 +++++++++++++++++ 3 栈和队列/{3.cpp => stack.cpp} | 0 2 files changed, 17 insertions(+) create mode 100644 3 栈和队列/queue.cpp rename 3 栈和队列/{3.cpp => stack.cpp} (100%) diff --git a/3 栈和队列/queue.cpp b/3 栈和队列/queue.cpp new file mode 100644 index 0000000..3d32b74 --- /dev/null +++ b/3 栈和队列/queue.cpp @@ -0,0 +1,17 @@ +#include +using namespace std; +#define MAXSIZE 100 + +struct Queue { + ElemType data[MAXSIZE]; + int front, rear; +} Q; + +void InitQueue(Queue &Q) { + Q.front = 0; + Q.rear = 0; +} + +int main() { + return 0; +} \ No newline at end of file diff --git a/3 栈和队列/3.cpp b/3 栈和队列/stack.cpp similarity index 100% rename from 3 栈和队列/3.cpp rename to 3 栈和队列/stack.cpp