Possible Duplicate:
Deep copy vs Shallow Copy
What is the difference between overloading operator= and overloading the copy constructor?
I see two ways of copying a class:
- Copy Constructor 
- operator= 
My question is, which one should make a new copy of dynamically allocated memory (2 classes with the same data and 2 instances of dynamic memory) and which should simply move the class to a new memory location (one class with the same dynamically allocated memory but the class is in a different place)?
 
     
     
    