The Queue * queue_create (void)
{
The Queue * q=malloc (sizeof (Queue));
If (NULL==q)
{
return NULL;
}
The else
{
Q - & gt; The front=0;
Q - & gt; Rear=0;
The return of q;
}
}
Molloc has a problem, of type void * values should not be used to initialize the Queue * type of entity
CodePudding user response:
Not molloc of malloc, and the need to introduce stdlib. H header file ~In addition, the proposal put up a complete code and error message ~
CodePudding user response:
Queue * q=(Queue *) malloc (sizeof (Queue));CodePudding user response:
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.htmlI hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html