书3.4
来源:互联网 发布:python和matlab哪个好 编辑:程序博客网 时间:2024/05/01 10:56
bool do_command(char c,Extended_queue &test_queue)
{
bool continue_input=ture;
Queue_entry x;
switch(c){
case'r':
if(test queue.retrieve(x)==underflow)
cout<<"Queue is empty."<<endl;
else
cout<<endl
<<"the first entry is:"<<x
<<endl;
break;
case'q':
cout<<"Extended queue demonstration finished."<<endl;
continue_input=false;
break;
case'a':
cout<<"enter a new data"
cin>>x;
if(test queue.append(x)==overflowe)
cout<<"Queue is full."<<endl;
else
queue.append(x);
break;
case's':
if(test queue.serve()==underflow)
cout<<"Queue is empty."<<endl;
else
queue.serve();
break;
case'#':
queue.size();
break;
case'c':
queue.clear();
break;
case'p':
if(queue.size()==0)
cout<<"Queue is empty."<<endl;
else
for(int i=0;i<count;i++)
cout<<entry[rear+i%maxqueue]<<endl;
break;
case'h':
help();
break;
}
{
bool continue_input=ture;
Queue_entry x;
switch(c){
case'r':
if(test queue.retrieve(x)==underflow)
cout<<"Queue is empty."<<endl;
else
cout<<endl
<<"the first entry is:"<<x
<<endl;
break;
case'q':
cout<<"Extended queue demonstration finished."<<endl;
continue_input=false;
break;
case'a':
cout<<"enter a new data"
cin>>x;
if(test queue.append(x)==overflowe)
cout<<"Queue is full."<<endl;
else
queue.append(x);
break;
case's':
if(test queue.serve()==underflow)
cout<<"Queue is empty."<<endl;
else
queue.serve();
break;
case'#':
queue.size();
break;
case'c':
queue.clear();
break;
case'p':
if(queue.size()==0)
cout<<"Queue is empty."<<endl;
else
for(int i=0;i<count;i++)
cout<<entry[rear+i%maxqueue]<<endl;
break;
case'h':
help();
break;
}
- 书3.4
- 【LDA|ML】西瓜书习题3.4
- 3.4
- 3.4
- 3.4
- 3.4
- 3.4
- 3.4
- 3.4
- 3.4
- 3.4
- 3.4
- 3.4
- 3.4
- 3.4
- 3.4
- 3.4
- 3.4
- .bash_profile和.bashrc区别
- rar for linux缺少GLIBC_2.7
- Emacs编码设置!
- UVALive 3305Tour(双调DP)
- Self--Study Chapter One (Summary programme principle)
- 书3.4
- char,wchar_t比较
- 【服务】
- xcode4.3 "/usr/include/sqlite3.h" file not found
- PreTranslateMessage作用和使用方法
- Exercise2.1 E4(数据结构与程序设计)
- poj 2245 Lotto
- 树状数组 求逆序数
- Android USB Tethering的实现以及代码流程