Click here to Skip to main content
15,917,862 members

Comments by Member 13508014 (Top 9 by date)

Member 13508014 8-Apr-19 5:09am View    
What I am surprised was, though the signature of foo() method is different in derived class, why should it hide foo() method of base class.
Member 13508014 1-Apr-19 13:50pm View    
Yes. I too realized and agree that the point that t3 should be exactly the sum of t1 and t2. Thanks CPallini for your time in answering my question.
Member 13508014 31-Mar-19 3:41am View    
Yes. Copy of b will be altered. I agree that.

But, I think, my question is not understood here.

My question is, in "a = b + c", lets assume that the object "a" is created a bit long and its state is modified now and when i call "a = b + c", i expect the addition operation to happen on only few members and those will get altered. Other member of object "a" for which "+" operation does not make sense should be same as before calling "a = b + c".
Member 13508014 28-Mar-19 7:40am View    
I read "Binary arithmetic operators" section of operator overloading - cppreference.com[^].
When we write a = b + c, according to the article, here 'b' will also get altered isn't it.
Member 13508014 16-Oct-18 12:09pm View    
Excellent. It clarified my doubt.