December 2004
Beginner
936 pages
20h 1m
English
On Day 5, “Organizing into Functions,” you learned the fundamentals of working with functions. Now that you know how pointers and references work, you can do more with functions.
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.
The Rectangle class, demonstrated in Listing 10.1, has two DrawShape() functions. One, which takes ...
Read now
Unlock full access