问题描述:
数据结构问题,关于队列的
.Status EnQueue(LinkQueue &Q,QElemType e)//插入元素e为列队Q的新队尾元素
{
p=(QueuePtr)mallco(sizeof(QNode));
if(!p) exit(OVERFLOW);
p->data=e;
p->next=NULL;
Q.rear->Next=p;
Q.rear=p;
return OK;
}
其中的
if(!p) exit(OVERFLOW);
Q.rear->Next=p;
Q.rear=p;
各是什么意思啊
.Status EnQueue(LinkQueue &Q,QElemType e)//插入元素e为列队Q的新队尾元素
{
p=(QueuePtr)mallco(sizeof(QNode));
if(!p) exit(OVERFLOW);
p->data=e;
p->next=NULL;
Q.rear->Next=p;
Q.rear=p;
return OK;
}
其中的
if(!p) exit(OVERFLOW);
Q.rear->Next=p;
Q.rear=p;
各是什么意思啊
问题解答:
我来补答展开全文阅读