#includeusingnamespacestd;constintMAXSIZE=100;typedefintElemType;typedefstruct{ElemTypedata[MAXSIZE];intfront;intrear;}SeqQueue;voidInitQueue(SeqQueue&Q){Q.front=Q.rear=0;}voidEnQueue(SeqQueue&Q,ElemTypex){if((Q.rear+1)%MAXSIZE==Q.front){cout
添加回答
举报
0/150
提交
取消