February 2020
Beginner to intermediate
616 pages
15h 16m
English
When you define a variable of the type structure, that variable can access members of the structure in the following format:
structurevariable.structuremember
You can see a period (.) between the structure variable and the structure member. This period (.) is also known as a dot operator, or member access operator. The following example will make it clearer:
struct cart mycart;mycart.orderno
In the preceding code, you can see that mycart is defined as a structure variable of the cart structure. Now, the mycart structure variable can access the orderno member by making the member access operator (.).
You can also define a pointer to a structure. The following statement defines ptrcart as a pointer to the cart structure.
struct ...
Read now
Unlock full access