 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Why
is the static cast important?
|
|
|
| • |
If
we didn't use a cast to change the type of the object we
|
|
|
are
assigning to,
|
|
|
|
• |
we
would then have a recursive call to the
|
|
|
overloaded
student assignment operator!
|
|
|
| • |
In
the following example, it we had not called the
|
|
|
checking
class' copy constructor and assignment operator
|
|
from
the student class copy constructor and assignment
|
|
|
operator,
we would correctly copy the student part, but
|
|
|
not
the checking and account parts.
|
|