What is the Diffrence between a "assignment operator" and a
"copy constructor"?
Answers were Sorted based on User's Feedback
Answer / kishore
Copy constructors are used during class object
initialization and assignment operators are invoked during
object assignment.
XYZ c;
XYZ Obj = c; -> invoke copy constructor
XYZ d;
d = c; -> invoke assignment operator
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / bheda govind
Assignment operater are types,
(1)simple
(2)compond a+=5
(3)expresion a=a+b
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / dee
assignment operator copies the values of one object to
another of the same class.It will excute only when the
right side of the variable is object and two sides are not
equal.It does shallow copy
Copy constructor craetes the object if its not existing and
copies the values of another object of the same class and
it does the deep copy.
| Is This Answer Correct ? | 1 Yes | 1 No |
I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?
Explain working of printf?
What does obj stand for?
What is #include iostream?
What are the implicit member functions of class?
Write a struct time where integer m, h, s are its members?
Where do I find the current c or c++ standard documents?
Floating point representation and output seems to be compiler dependent?
Write a C/C++ program to show the result of a stored procedure "PROC_RESET_MAIL" on database "USER_NOTIFY".
2 Answers ABC, Accenture, DataLand, HCL, Webyog,
write a program to insert an element into an array
what is Loop function? What are different types of Loops?
What is the best c++ book?