明白队列的请进!这种定义不对吗?
typedef struct QNode {int no;
struct QNode *link;
} QNode,*QueuePtr;
typedef struct {
QueuePtr front;
QueuePtr rear;
} LinkQueue;
EnQueue(LinkQueue *Q,int e) {
LinkQueue *p;
p=(QueuePtr)malloc(sizeof(QNode));
p->no=e;
p->link=NULL;
Q->rear->link=p;
Q->rear=p;
}
编译显示 structure has no member named ’no'
structure has no member named ‘link'