I\'m learning C++ and I created two simple hello-world applications. In both of them I use operator overload, but here is the problem. On the first one, I can provide two argume
Since + is a binary operator, if you overload it inside a struct/class, you can only provide one more operand, the reason is that the first operand is implicitly the calling object. That is why in the first case, you have two parameters since it is outside scope of your class/struct, while in the second case, it was overloaded as member function.