//求循环队列的长度
Status Get_Lenth(P_Que Q){
if( NULL == Q )
return ERROR;
else if(Q->front == Q->rear)
return 0;
return (MAXSIZE - Q->front + Q->rear)%MAXSIZE;
}
运行结果:
OK,that's all for today.
//求循环队列的长度
Status Get_Lenth(P_Que Q){
if( NULL == Q )
return ERROR;
else if(Q->front == Q->rear)
return 0;
return (MAXSIZE - Q->front + Q->rear)%MAXSIZE;
}
运行结果:
OK,that's all for today.