Question: what is the difference between shallow copy and deepcopy in c++?
Answer: C++ Notes: Shallow vs Deep Copies A shallow copy of an object copies all of the member field values. ... A deep copy copies all fields, and makes copies of dynamically allocated memory pointed to by the fields.