Introduction of structure pointer variables
01——Introduction of concepts
remember:
Pointers are addresses!
Pointer variables are variables that store addresses!
Structures are variables too!
There are two ways to access variables: 1. Direct access by variable name 2. Indirect access by address!
In the previous case, the variable name was used to access it directly.
Accessing the structure through the structure variable address requires a variable to save the address: this is actually the same as the pointer mentioned before. It's just that the pointer type is a structure.
02——Access structure content through structure pointer
Notice:
Variable name access: use the dot operator
Address access: use "->" operator