what's the difference between deep copy and shallow copy or not so deep copy :rolleyes:
As far as I understand it, when copying an object containing pointers to dynamically allocated memory, a shallow copy (which occurs by default) only copies the bare pointer members, so that the two objects both refer to the same block(s) of dynamically allocated memory.
On the other hand, take the STL <list> for example - when you create a copy, all the elements pointed by the list's implementation are duplicated, and the new copy won't contain any links to the source from which the copy was made, hence this is a deep copy.