May 2002
Beginner
320 pages
6h 18m
English
The table in this appendix lists and describes the many operators of the C++ language. Many of these operators are available for overloading in your classes.
When overloading the operators, you are not restricted to the types indicated here. Often the type will be your class. You can also overload any infix operator more than once to work with different types, but remember that the return type is not part of what differentiates two overloads.
| Operator | Name/Meaning | Works On | Overload | Example | Reads As |
|---|---|---|---|---|---|
| Arithmetic Operators | |||||
| + | Add | Numeric and char | Y | a+b | Add a and b to produce a result |
| - | Subtract | Numeric and char | Y | a-b | Subtract b from a to produce a result |
| * | Multiply | Numeric and char | Y | a*b | Multiply a by b to produce a result |
Read now
Unlock full access