‘friend’ functions and
Note: You might want to look at the operator overloading FAQ. Binary operators can either be members of their left-hand argument’s class or free functions. (Some operators, like assignment, must be members.) Since the stream operators’ left-hand argument is a stream, stream operators either have to be members of the stream class or free functions. … Read more