C++ has the same operators that are used in arithmetic, but some of the symbols are different:
| Arithmetic | C++ | Meaning |
|---|---|---|
| = | == | Equal to |
| =/ | != | Not equal to |
| < | < | Less than |
| > | > | Greater than |
| < | <= | Less than or equal to |
| > | >= | Greater than or equal to |
C++ also has an ordering or operator precedence, similar to arithmetic:
| Operator | Precedence |
|---|---|
| ( ) | 1 |
| *, /, % | 2 |
| +, - | 3 |
| <, >, <=, >= | 4 |
| ==, != | 5 |