Difference between Copy constructors and Assignment operator
Copy constructor is a special kind of constructor which initializes an object using another object. Compiler always provides a default copy constructor but if needed it can be over-ridden by programmer to meet the requirements.
Assignment operator is basically assigning the new values to already created object. In this case object initialization doesn’t happen as it is already done.
For eg:
class Base{
};
Base b1;
Base b2 = b1; /* Copy constructor as initialization also needs to done */
Base b3;
b3 = b2; /* Assignment operator as object is already created */