For example if i have two structures:
struct name {
char name [MAX_COMMAND_LENGTH];
int name_num;
struct last_name *last_name;
}
struct last_name {
struct last_name *next_last_name;
char last_name [MAX_COMMAND_LENGTH];
char number [MAX_COMMAND_LENGTH];
}
void function(struct name *name, struct last_name *last name){
// code here using variables in both functions
}
Why is it in the function can I not pass both structures for use?
Note: this isn't my actual code but rather an example of what I am trying to achieve and the fact is that I am trying to understand why you cant pass multiple structures in c and not rather how to fix my code.
I am getting this error:
pizzeria.c:169:46: warning: ‘struct the_pizzeria’ declared inside parameter list will not be visible outside of this definition or declaration