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 class.

• Use overloaded operators and additional features of the string class.

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

• Perform dynamic memory allocation with new and delete.

• Use keyword explicit to indicate that a constructor cannot be 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
18.226.93.137