int InitQueue(LinkQueue &Q){
//构造一个空队列
Q.front=Q.rear=(QueuePtr)malloc(sizeof(QNode));
if(!Q.front)
exit(0);//存储分配失败
Q.front->next=NULL;
return 1;
}
这个代码错在什么地方?
程序编译出来提示错误是 invalid conversion from QNode*' to
int'和base operand of `->' is not a pointer。请问如何修改
传参可能不对,应该是指针