In my examples I use classes Dog and Dalmatian. I trust that everyone knows that Dalmatian is a breed of dog, hence all Dalmatian objects are also Dog objects. A Dalmatian object is a Dog object plus extra fields.
If you convert a Dog to a Dalmatian using a copy constructor, stop using the Dog object because any changes you make to the Dalmatian object Dog fields will not be reflected back in the source Dog object.
If you convert a Dog to a Dalmatian object by having a Dog reference in the Dalmatian object, any changes you make to the Dalmatian object Dog fields will be reflected in the original Dog object.
This page is posted |
http://mindprod.com/jgloss/dog.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\dog.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[18.117.142.3] |
| |
Feedback |
You are visitor number | |