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..................../******************************************
2、*******************/ class Queue_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 qS
5、-=TimePiece; return OK; } //int qXChange(int); };//==================Define of Class Queue_c=====================================//============================================================================== class Work_c {Queue_c buf; public: int wCPU
6、();// ElemType wScan(int &t); int wMakeP(); int wShowBUF(){return buf.qShowQueue();} int wInBUF(int i){return buf.qEnQueue(i);} };//==================Define of Class Work_c=====================================//==========================================
7、====================================/*******************************==main==************************************************************************************==proc==***************************************************/ void main() { Work_c w; int i; /