This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | Previous revision | ||
|
cpp:operators [2017/04/10 04:47] gthanos |
cpp:operators [2017/04/11 05:19] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Τελεστές ====== | ||
| - | |||
| - | Η προτεραιότητα των τελεστών στη C++ δίνεται από τον παρακάτω πίνακα. | ||
| - | |||
| - | ^ Level | ||
| - | | 1 | Scope | :: | scope qualifier | ||
| - | | 2 | Postfix (unary) | ||
| - | | ::: | ::: | () | functional forms | ::: | | ||
| - | | ::: | ::: | [] | subscript | ||
| - | | ::: | ::: | . -> | member access | ::: | | ||
| - | | 3 | Prefix (unary) | ++ -- | prefix increment / decrement | Right-to-left | | ||
| - | | ::: | ::: | ~ ! | bitwise NOT / logical NOT | ::: | | ||
| - | | ::: | ::: | + - | unary prefix | ::: | | ||
| - | | ::: | ::: | & * | reference / dereference | ::: | | ||
| - | | ::: | ::: | new delete | ||
| - | | ::: | ::: | sizeof | ||
| - | | ::: | ::: | (type) | ||
| - | | 4 | Pointer-to-member | ||
| - | | 5 | Arithmetic: scaling | ||
| - | | 6 | Arithmetic: addition | ||
| - | | 7 | Bitwise shift | << >> | ||
| - | | 8 | Relational | ||
| - | | 9 | Equality | ||
| - | | 10 | And | & | bitwise AND | Left-to-right | ||
| - | | 11 | Exclusive or | %%^%% | bitwise XOR | Left-to-right | ||
| - | | 12 | Inclusive or | %%|%% | bitwise OR | Left-to-right | ||
| - | | 13 | Conjunction | ||
| - | | 14 | Disjunction | ||
| - | | 15 | Assignment-level expressions | ||
| - | | ::: | ::: | ?: | conditional operator | ::: | | ||
| - | |16 | Sequencing | ||