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

Answer Posted / guest

A copy constructor constructs a new object by using the
content of the argument object. An overloaded assignment
operator assigns the contents of an existing object to
another existing object of the same class.

Is This Answer Correct ?    44 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How java is different from c and c++?

929


Does c++ cost money?

766


How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?

857


What are the advantages of early binding?

829


Explain what is class definition in c++ ?

804


What is a friend function in c++?

1031


What is near, far and huge pointers? How many bytes are occupied by them?

887


In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that

846


Is c better than c++?

837


What do you mean by function pointer?

839


What are proxy objects in c++?

896


Explain what data encapsulation is in c++?

797


How can an improvement in the quality of software be done by try/catch/throw?

820


What is cout flush?

761


How many types of comments are there in c++?

763