Why does my operator overloading handle left versus right objects?
问题 I had a question on operator overloading. Below is my the example code. If you can read through it and my question is below. //class definition class example { private: int a ; // Defined in FeetInches.cpp public: void seta(int f) { a = f; } example operator + (const example &); // Overloaded + int geta() { return a; } }; example example::operator + (const example &right) { example temp; temp.a = a + right.a; return temp; } //main #include "header" //this is the class definition above