我在从一本书里学习排队。我在学习循环队列时遇到了一个问题。我正在学习的作者使用以下代码来解释如何将元素插入循环队列中。
#define MAX 100
char *p[MAX];
int spos = 0; // spos: holds the index of the **next free** storage location
int rpos = 0;// rpos: holds the index of the next item to retrieve
void qstore(char *q)
{
/* The queue is full if either spos is