10 Operator Overloading; Class string

Objectives

In this chapter you’ll:

  • Learn how operator overloading can help you craft valuable classes.

  • Overload unary and binary operators.

  • Convert objects from one class to another.

  • Use overloaded operators and additional features of class string.

  • Create PhoneNumber, Date and Array classes that provide overloaded operators.

  • Perform dynamic memory allocation with new and delete.

  • Understand how keyword explicit prevents a constructor from being used for implicit conversions.

  • Experience a “light-bulb moment” when you’ll truly appreciate the elegance and beauty of the class concept.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset