 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Notice
how similar defining objects of class is
|
|
to
defining variables of any data type:
|
|
|
|
• |
string my_str; vs. int i;
|
|
|
| • |
Defining
an object causes the “constructor” to
|
|
|
be
invoked; a constructor is the same named
|
|
|
function
as the class (string) and is used to
|
|
|
initialize
the memory set aside for this object
|
|
|
| • |
Think
about how much memory is set aside?
|
|
|
| • |
What
initial values should it take on?
|
|