zuoye

#include
#include
typdef int QElemtype;
typedef struct QNode{
 QElemtype data;
 struct QNode *next;
}QNode,*QueuePtr;
typedef struct LinkedQueue{
 QueuePtr front;
 struct QNode rear;
}LinkedQueue;
void initQueue(LinkedQueue &Q)
{
 Q.front=Q.rear=(QNode *)malloc(sizeof(QNode));
    Q.rear->next=NULL;
}
void enQueue(LinkedQueue &Q,QElemtype e)
{
 Q.rear->next=(QNode *)malloc(sizeof(QNode));
 Q.rear=Q.rear->next;
 Q>rear->data=e;
 Q.rear->next=NULL;
}
void deQueue(LinkedQueue &Q,QElemtype &e)
{
 if(Q.front!=Q.rear)rear{
  QNode *p=Q.front->
}

你可能感兴趣的:(zuoye)