#include<stdio.h>
#include<stdlib.h>
#define MAXSIZE 10
typedef int ElemType;
//队列的数据存储结构
typedef struct SqQueue
{
ElemType data[MAXSIZE];
int front;
int rear;
}SqQueue;
//初始化一个空循环队列
int InitQueue(SqQueue *Q)
{
Q->front=0;
Q->rear=0;
return 1;
}
//循环队列入队操作
int EnQueue(SqQueue *Q,ElemType e)
{
if((Q->rear+1)%MAXSIZE==Q->front);
return 0;
Q->data[Q->rear]=e;
Q->rear=(Q->rear+1)%MAXSIZE;
return 1;
}
//循环队列的出队操作
int Dequeue(SqQueue *Q,ElemType *e)
{
if(Q->rear=Q->front)
return 0;
*e=Q->data[Q->front];
Q->front=(Q->front+1)%MAXSIZE;
return 1;
}
int main()
{
return 1;
}