so we let c do all the destroying we copying objects

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: iable and set its value to will 10:20:30. 10:20:30. W e can eliminate that proviso for Set() to be We Set() to called before use of any instance of this type. Set() still does have its uses. Set() Applied Programming Applied Programming TimeType doesn't need a destructor (what would doesn't we do in it?) so we let C++ do all the destroying. we Copying objects In C++ this occurs in two forms: What can we do with objects? explicit – the programmer specifies that a the particular object's values are to be transferred to the memory of another object the Apart from declaring them, calling functions using Apart them and dynamically allocating them? them Well, lots. Applied Programming Applied Programming Copying objects In C++ this occurs in two forms: For structs, we found that assignment was For structs we practically the only operator that worked. practically explicit – the programmer specifies that a the particular object's values are to be transferred to the memory of another object – assignment Since classes are very similar, assignment also Since w...
View Full Document

Ask a homework question - tutors are online