What is the difference between a copy constructor and an
overloaded assignment operator?

Answer Posted / siddharth wighe

Second main difference:
A copy constructor has no return type, whereas an
overloaded assignment operator has one.

Third difference (trivial):
Name of the copy constructor is the same as that of the
class in which it is defined

----------------------
http://swighe.nipl.net

Is This Answer Correct ?    32 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a struct time where integer m, h, s are its members?

513


How static variables and local variablesare similar and dissimilar?

555


What is the most common mistake on c++ and oo projects?

515


What is a set in c++?

531


Tell me can a pure virtual function have an implementation?

550






how to explain our contribution in the project?

3075


Are strings mutable in c++?

692


Is the declaration of a class its interface or its implementation?

702


What is set in c++?

653


What are friend functions in C++?

618


Comment on local and global scope of a variable.

574


Do vectors start at 0 c++?

530


What is called array?

617


What are multiple inheritances (virtual inheritance)?

579


What are the methods of exporting a function from a dll?

646