typedef struct {
int age, height, weight;
} Person;
//this is in global variables
...
Person *p = (Person *)malloc(sizeof(int) * 20); //this is local variable in main function
In this situation, I want to make functions that use typedef variables as arguments.
For example,
if I make a function like void print_line()
that print age, height, weight , what should I write in ()
?
At first I wrote void print_line(Person);
But VS says it's an error.
Please help me.