First page Back Continue Last page Graphics
Classes: Overloading
When you specify 2 + 2 or 3.4 * 4.8, the compiler can figure out from the context which operator to use.
When you say t1 + t2 where t1 and t2 are objects instantiated from the Time class, the compiler can't figure out how to do addition???
Overloading lets you use standard C++ operators like = and + with class objects.