O'Reilly logo

C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart, Second Edition by Brian Overland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

image

image

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++

the * and ++ operators are at the same level of precedence (level 2), so the order of evaluation is determined ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required