Default Memberwise Assignment

The assignment operator (=) can be used to assign an object to another object of the same type. Member wise assignment can cause serious problems when used with a class whose data members contain pointers to dynamically allocated storage.























Figure 1.31: Default memberwise assignment. (part 1 of 2)
\includegraphics[scale=0.45]{figures/img83.ps}
\includegraphics[scale=0.45]{figures/img84.ps}
Figure 1.32: Default memberwise assignment. (part 2 of 2)
\includegraphics[scale=0.43]{figures/img85.ps}
2004-07-29