[Solved] Operator Overloading of one class to be used in another class [closed]
To provide potentially more information about what you may be trying to do, see the following example: class var1 { int a, b; public: var1 operator+( const var1& rhs ) { var1 output; output.a = this->a + rhs.a; output.b = this->b + rhs.b; return output; } }; class var2 { var1 res1, res2; public: var2 … Read more