Answer Posted / guest
You use the assignment operator (operator = ()) whenever an
existing object is to be replaced with a different object.
The copy constructor X(const X&) is used to create a new
instance of an X-object exactly like another.
Notice the subtle difference. Assignment changes an existing
object while construction creates a new object. You can view
assignment as the application of a destructor, to flush away
the existing object, followed by a copy construction, to
make an exact copy of the assigned object.
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is an advantage of polymorphism?
Is html an oop?
any one please tell me the purpose of operator overloading
write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.
Is abstract thinking intelligence?
What are classes oop?
What is encapsulation in ict?
How oops is better than procedural?
What is the highest level of cohesion?
What is class and object in oops?
What is overriding in oop?
What is abstraction with example?
can we make game by using c
What are the components of marker interface?
What is destructor in oop?