CPP Accessing Class Members

Accessing Class Members on object created on the free store.

To access the getAge member function of an object
pointed to by pPerson, you could write:

// parentheses are used to ensure that pPerson is dereferenced first
(*pPerson).getAge();

Because this is cumbersome, C++ provides a shorthand
operator for indirect access: the class member access operator (->),
which is created by typing the dash (-) immediately followed by
the greater-than symbol (>).