Hallo!
My question is the following:
When I define a class, I can define, for example, an operator+ as a member function of that class, but I can't define an operator<< as a member function. I don't understand why.
Waiting for a kindly replay.
Regards.
Of course you can! If you are having trouble making it work, post some simple code illustrating what you are trying to do, and someone will likely be able to help you out.
if you mean the stream operator <<, you'll need to make it a friend function since the left operand would be a stream.
Member binary operators always take a class object as left operand