Pointers
One reason to use raw pointers is to define relationship between object. In the example the Person
object has a Person*
member called father
. This defines a relationship a Person
object with another Person
object.
name
of george
's father
.george.father->name
to access the name
.