This function is used to display the context of a queue. I input an
integer comparing with the queue cuisine number, if cuisine number is
same as the input, it shows the context. However, it cannot do what I
want. Did I do sth wrong ?
void DisplayRestaura ntByCuisine( Queue * q, char input){
QueueNode * tmp;
char * item, * cuisine, *mode;
cout << "In restaurant by cuisine";
while(!QueueEmp ty(q)){
tmp = q->front;
item = tmp->item;
cuisine = tmp->cuisine;
mode = tmp->mode;
if( input == cuisine ){ <-----------comparing
cout << item << mode << endl;
}
q->front = tmp->next;
}
integer comparing with the queue cuisine number, if cuisine number is
same as the input, it shows the context. However, it cannot do what I
want. Did I do sth wrong ?
void DisplayRestaura ntByCuisine( Queue * q, char input){
QueueNode * tmp;
char * item, * cuisine, *mode;
cout << "In restaurant by cuisine";
while(!QueueEmp ty(q)){
tmp = q->front;
item = tmp->item;
cuisine = tmp->cuisine;
mode = tmp->mode;
if( input == cuisine ){ <-----------comparing
cout << item << mode << endl;
}
q->front = tmp->next;
}
Comment