Today, you will learn
• How to overload member functions
• How to overload operators
• How to write functions to support classes with dynamically allocated variables
On Day 5, you learned how to implement function polymorphism, or function overloading, by writing two or more functions with the same name but with different parameters. Class member functions can be overloaded as well, in much the same way.
Rectangle class, demonstrated in Listing 10.1, has two
DrawShape() functions. One, which takes ...