remove maps

This commit is contained in:
Jidong Xiao
2023-10-17 01:37:51 -04:00
parent 849d46e4ad
commit eda2a09332

View File

@@ -72,8 +72,7 @@ ostream& operator<< (ostream & ostr, Complex const& c) {
## 14.4 Operators as Non-Member Functions and as Member Functions ## 14.4 Operators as Non-Member Functions and as Member Functions
- We have already written our own operators, especially operator<, to sort objects stored in STL containers - We have already written our own operators, especially operator<, to sort objects stored in STL containers.
and to create our own keys for maps.
- We can write them as non-member functions (e.g., operator-). When implemented as a non-member function, - We can write them as non-member functions (e.g., operator-). When implemented as a non-member function,
the expression: z - w is translated by the compiler into the function call: operator- (z, w) the expression: z - w is translated by the compiler into the function call: operator- (z, w)
- We can also write them as member functions (e.g., operator+). When implemented as a member function, the - We can also write them as member functions (e.g., operator+). When implemented as a member function, the