. is the standard member access operator. It has higher precedence than the
* dereference operator.
Accessing the member of an object through a pointer requires dereferencing to happen first, so the dereferencing operation must be wrapped in parentheses.
Example 1: Access Member Variable
Example 2: Iterate over a Map
When you use iterators to loop through a container, you need to dereference the iterator to access each object. The arrow operator can provide a convenient shortcut for this: