We are all special cases.
– Albert Camus
Subscripting; Function Call; Dereferencing; Increment and Decrement; Allocation and Deallocation; User-Defined Literals
Essential Operations; Access to Characters; Representation; Member Functions; Helper Functions; Using Our String
• Friends
Finding Friends; Friends and Members
• Advice
Overloading is not just for arithmetic and logical operations. In fact, operators are crucial in the design of containers (e.g., vector and map; §4.4), “smart pointers” (e.g., unique_ptr and shared_ptr; §5.2.1), iterators (§4.5), and other classes concerned with resource management.
The operators
No credit card required