C++🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
// // Created by qza2468 on 2021/11/4. // class Square{ private: int x, y; public: int operator+ (const Square &s2) const { return x * y + s2.x * s2.y; } };
题主,想要的是这样吗?我觉得不太可取。很容易误解。