#include
#include
//定义节点
typedef struct node {
char date;
struct node* next;
}node;
//定义队列(保存队首和队尾指针)
typedef struct link {
node* front;
node* rear;
}que;
//初始化队列
que* initqueue()
{
que* q = (que*)malloc(sizeof(que));
q->front = q->rear = NULL;
return q;
}
//判断是否为空
int emptyqueue(que* q)
{
if (q->front == NULL)
return 1;//为空
else
return 0;
}
//入队
void insertQueue(que* q, char date)
{
node* n = (node*)malloc(sizeof(node));
if (n == NULL)
{
return ;
}
n->date = date;
n->next = NULL;
if (q->rear == NULL)
{