12345678910111213
class MyClass { int x; public: MyClass(){x=0;} const operator+(const MyClass &other) const; } const MyClass MyClass::operator+(const MyClass &other) const { x+=other.x; //Illegal return *this; }