Why we use reference return in assignment operator overloading and not at plus-minus ops?

前端 未结 5 600
予麋鹿
予麋鹿 2021-02-01 07:19

As I read in books and in the web, in C++ we can overload the \"plus\" or \"minus\" operators with these prototypes (as member functions of a class Money):

5条回答
  •  囚心锁ツ
    2021-02-01 07:46

    The link shown below has better explanation I guess return value of operator overloading in C++

提交回复
热议问题