2
Reply

what’s the difference between copy constructor and assignment operator?

Nov 28, 2006
6.3k
0

    Copy constructor will be called when you are creating an object and initializing it with the help of another in a single expression .But on the other hand assignment operator will be called when you are initializing a object by another object not creating it.

    Naveen Sikri
    March 26, 2007
    0

    The answer should be, that the copy costructor is called at initializing the object, while the assignment operator used to assign one object by another.

    November 28, 2006
    0