1、#include#include#include const int QueueNum=10;const int QueuePre=-1;const int ERROR=0;const int OK=1;const int TimePiece=1;typedef int ElemType; //head define..................../*************************************************************/ class Queue
2、_c { ElemType Q[QueueNum]; int front,rear; public: //basic information of the class Queue_c: Queue_c(); int qFull(); int qEmpty(); int qEnQueue(ElemType e); ElemType qDeQueue(); int qGetNumber(); int qGetElem(int); int qShowQueue();//other functions:ElemType qGetFrontElem(){if(qEmpty(
3、)){cout<<"ERROR!"<
4、RROR!"<
5、=//============================================================================== class Work_c {Queue_c buf; public: int wCPU();// ElemType wScan(int &t); int wMakeP(); int wShowBUF(){return buf.qShowQueue();} int wInBUF(int i){return buf.qEnQueue(i);} };//==================Define of