C++循环顺序队列(二)

2015-11-21 01:42:02 · 作者: · 浏览: 7
d(unsigned(time(NULL))); int n=rand()%10+1; cout<<"产生的随机数组是:"<
// SqQueueTest.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include"SqQueue.h"
#include
                                     
                                       using namespace std; int _tmain(int argc, _TCHAR* argv[]) { SqQueue
                                      
                                        SQ(10); SQ.randSqueue(); char YesOrNo='Y'; int num,a; Status sta; while (YesOrNo=='Y'||YesOrNo=='y') { cout<<"1. 进队列:"<
                                       
                                        >num; switch (num) { case 1: cout<<"输入进队列的值:"<
                                        
                                         >a; sta=SQ.enQueue(a); if (sta==ERROR) cout<<"队列已满!!!"<
                                         
                                          >YesOrNo; } system("pause"); return 0; }