I've heard it is used as overloaded operator+ for example
class MyClass
{
int x;
public:
MyClass(int num):x(num){}
MyClass operator+(const MyClass &rhs)
{
return rhs.x + x;
}
};
int main()
{
MyClass x(100);
MyClass y(100);
MyClass z = x + y;
}
Is this really the use of unary plus operator or is it really a binary + operator?