编制一个病人看病模拟程序。
在病人排队过程中,主要重复两件事:
1.病人到达诊室,将病历本交给护士,排到等待队列中候诊。
2.护士从等待队列中取出下一位病人的病历,该病人进入诊室就诊。
//main.cpp
#include <iostream>
#include <Windows.h>
#include "SqQueue.h"
using namespace std;
int main()
{
/*
//测试队列是否可用
void testSqQueue();
testSqQueue();
*/
//护士给病人看病
void nurse();
nurse();
cout << endl;
system("pause");
return 0;
}
//护士给病人看病
void nurse() {
SqQueue *Sq;
InitSqQueue(Sq);
SqElemType ElemToSq = 0; //存放进队时的元素
SqElemType saveOutElem = 0; //存放出队时的元素
int arr[] = {
1,2,3,4,5 };
int arrLength = sizeof(arr) / sizeof(int);
int menuNum = 0; //存放菜单编号的变量
int patientNum = 0; //存放病历号的变量
cout << "编制一个护士看病模拟程序。\n";
while (menuNum != 4) {
cout