Hello,
I was taking a look at overloading the = operator in a C Plus Plus book. Part of the code of the overloaded =operator included checking for the case when the same object was on both sides of the equal sign. When and why would you have a situation like this?
Thank You
I was taking a look at overloading the = operator in a C Plus Plus book. Part of the code of the overloaded =operator included checking for the case when the same object was on both sides of the equal sign. When and why would you have a situation like this?
Code:
someobject1=someobject1;
Comment