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 encapsulation in oops?
Why do pointers exist?
given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy
What are objects in oop?
What is basic concept of oop?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
What is encapsulation c#?
What do you mean by abstraction?
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
What are the benefits of interface?
What is a class in oop?
What is polymorphism used for?
Why do we use class?
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
can inline function declare in private part of class?