A. Operators

Table A.1 lists C++ operators with their precedence, associativity, description, and syntax. The levels—to which I’ve assigned numbers—have no significance beyond the fact that all operators at the same level have equal precedence.


Table A.1: C++ Operators by Precedence Level

Associativity can be left-to-right or right-to-left. This matters when two operators are at the same level of precedence. For example, in the expression

*p++ ...

Get C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.