In this chapter, you learned how to overload operators to work with class objects. We demonstrated standard C++ class
string, which makes extensive use of overloaded operators to create a robust, reusable class that can replace C strings. Next, we discussed several restrictions that the C++ standard places on overloaded operators. We then presented a
PhoneNumber class that overloaded operators << and >> to conveniently output and input phone numbers. You also saw a
Date class that overloaded the prefix and postfix increment (++) operators and we showed a special syntax that’s required to differentiate between the prefix and postfix versions of the increment (
Next, we introduced the concept of dynamic memory management. ...