Possible Duplicates:
What is the copy-and-swap idiom?
Copy constructor and = operator overload in C++: is a common function possible?
Is there a way that I can make the body of the copy constructor and assignment operator contain the same code without actually having duplicate code (except for the function headers)?
Place the functionality in a separate method and then call that from both your copy constructor and assignment operator code.
Alternatively, you could just call your assignment operator from the copy constructor.