Pointers To Structures
Syntax
If typeName or structName has already been defined:
typeName *ptrName;
-or-
struct structName *ptrName;
Example 1
Example 2
Using a Pointer to Access Structure Members
Syntax
If ptrName has already been defined
ptrName —> memberName
Pointer must first be initialized to point to the address of the structure itself: ptrName = &structVariable;