#include <iostream>
using namespace std;
typedef struct LinkNode{
int data;
struct LinkNode* next;
}LinkNode;
typedef struct{
LinkNode* head,end;
}LinkQueue;
void InitQueue(LinkQueue &Q){
Q.head=Q.end=(LinkNode*)malloc(sizeof(LinkNode));
Q.head->next=NULL;
}
void EnQueue(LinkQueue &Q,int x){
LinkNode *s=(LinkNode*)malloc(sizeof(LinkNode));
s->data=x;
head->next=s;
s->next=NULL;
end=s;
}
void Queue(LinkQueue &Q,int x){
if(head==end)
return false;
LinkNode *p=head->next;
x=p->data;
head->next=p->next;
p->next=NULL;
if(end==p)
Q.head=Q.end;
free(p);
}
bool IsEmpty(LinkQueue Q){
if(head==end)
return true;
else
return false;
}
int main() {
LinkQueue Q;
InitQueue(Q);
return 0;
}