I'm playing around with data passed in a structure. In one function I do this:
In the called 'order' routine, I do this:
but I get a compiler error:
warning: passing arg 1 of `menu' from incompatible pointer type
Code:
/* path is defined as char* path[10] in the struct */ struct request customer_request; if(strcmp("order",customer_request->path[0])==0) order(customer_request);
Code:
void order(struct request *customer_request){ if(strcmp("menu",customer_request->path[1])==0) menu(customer_request);
warning: passing arg 1 of `menu' from incompatible pointer type
Comment