typedef struct Queue {? ? QElemType data[MAXSIZE];? ? QElemType front;? ? QElemType rear;? ? QElemType next;}SeqQueue;SeqQueue *sq;這是結構體創建空隊后實現元素e入隊此時if (q->rear == MAXSIZE){? ? ? ? printf("隊列已滿");? ? ? ? exit(0);? ? }和?if((q->rear+1)%MAXSIZE ==q->front){??????????printf("隊列已滿");? ? ? ? exit(0);????}??其中if的條件是什么意思?兩者有什么區別?
- 0 回答
- 0 關注
- 1991 瀏覽
添加回答
舉報
0/150
提交
取消