Chapter 11: Operator Overloading: Class string
- 11.2 Using the Overloaded Operatos of string
- empty()
- += operator
- substr()
- 11.5 Overloading the Binary Stream Insertion (<<) and Stream
Extraction (>>) Operators
- PhoneNumber.h
- L.12 ostream must be passed by reference, otherwise you will get
a compilation error because it is unable to modify ostream.
- L.12 PhoneNumber is passed by reference simply because of
performance.
- L.13 PhoneNumber must be passed by reference because you
want to read value from istream and store in it.
- PhoneNumber.cpp
- L.24 In input, setw() limits the number of characters to be
read.
- L.25 ignore() skips characters
- Fig11_05.cpp
- 11.7 Overloading the Unary Prefix and Postfix ++ and -- Operators
- Date.h
- Date.cpp
- L.41 The prefix increment operator (++n)
returns a reference to the object
- L.49 The postfix increment operator (n++)
returns a copy of the object
- fig11_08.cpp
- 11.9 Dynamic Memory Management
- fig11_09.cpp
- L.69 operator[] can also be overloaded.
- Array.h
- L.15 The argument to a copy constructor should be a
const reference to allow a const object to be copied.
- Array.cpp
- L.51 avoid self-assignment
- 11.13 Implicit Conversion with Single-Argument Constructors
- explicit Constructors
- Ex 11.8 Complex Class
- Ex 11.9 HugeInt Class