Shallow Copy
Value type fields are copied bitwise.memcpy(dest, src, sizeof(src));
Deep Copy
Value type fields are copied bitwise.An example:
Our CWebPage class has a reference type, and a value type.
We will implement ICloneable twice.
Once to create a shallow copy of CWebPage.
Once to create a deep copy of CWebPage.
ICloneable implementing a shallow copy:
ICloneable implementing a deep copy: