When we have :
struct node {
char...
int....
struct node *....
}
typedef struct node Node;
and then we have a function like this:
int function(Node f){...}
What is this f
?
f
is an input argument of the type Node
. The type Node
is synonym of the type struct node
.
In the statement typedef struct node Node;
you are giving alias name of struct node
as Node
by using typedef
.
So in the definition of function()
int function(Node f){...}
f
is nothing but variable of struct node
type.
Also you can see the typedef
declaration and meanings here http://en.cppreference.com/w/c/language/typedef
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.