Overriding the output stream operator
We’ve seen how to overload an operator in C++. The stream operators are similar in nature, however, they can be a bit more involved. In many languages, there is a default toString() method for your classes, which lets the language know how to connect to the string. However, there isn’t one in C++, so we…