The first is the definition of the structure. There are two members in this structure, one is the variable data of the element type (this element type elemtype can be defined by yourself, it can be int
char
double, etc.), one is the address variable (next), which is used to store the address of the next node, which means that the next node may be accessed through the value of this member variable, so generally Name it next;
Then the usage of the keyword typedef. If you write such a statement: typedef
int
int; then in the following code You can use int to define integer variables.
The same is true here, ignoring the definition of the structure, then this code is: typedef
struct
node,*linklist; that is to say, you can use node in the following code To define a variable of node type, you can use linklist to define a variable of node pointer type