#define MAXQSIZE 10typedefint QElemType;typedefstruct{
QElemType* base;int front;int rear;}SqQueue;//构造空队列
Status InitQueue(SqQueue* Q);//销毁队列
Status DestroyQueue(SqQueue* Q);//清空队列
Status ClearQueue(SqQueue* Q);//判队列空
Status QueueEmpty(SqQueue Q);//队列长度intQueueLength(SqQueue Q);//取队头元素,用e返回
Status GetHead(SqQueue Q, QElemType* e);//插入元素
Status EnQueue(SqQueue* Q, QElemType e);//删除元素
Status DeQueue(SqQueue* Q, QElemType* e);//遍历队列
Status QueueTraverse(SqQueue Q,void(*visit)(QElemType));//辅助函数voidvisit(QElemType e);
函数定义
//构造空队列
Status InitQueue(SqQueue* Q){
Q->base =(QElemType*)malloc(MAXQSIZE *