When copy constructor can be used?

Answer Posted / jack

while compiler encounters following situation it uses the CC
1.when assigning one object to another object of same class
type

2.When an object is passed to the called function.....

3.when a function returns the object type and assigns it to
the another object..........

Is This Answer Correct ?    18 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you sort a set c++?

532


Explain the difference between static and dynamic binding of functions?

555


What do you mean by a template?

623


What does #define mean in c++?

615


What is object file? How can you access object file?

601






Explain rtti.

595


When does the c++ compiler create temporary variables?

573


What are built-in functions? What is the syntax for the definition?

570


How to declare a function pointer?

579


Describe the role of the c++ in the tradeoff of safety vs. Usability?

713


why is iostream::eof inside a loop condition considered wrong?

595


Why main function is special in c++?

669


describe private access specifiers?

643


Explain differences between new() and delete()?

622


Why do we use vector in c++?

602