4.1 Types of Expressions

C++ expressions are divided into several categories:

Primary expressions. These are the building blocks from which all other expressions are formed. (See “Primary Expressions”.)

Postfix expressions. These are primary expressions followed by an operator—for example, the array subscript or postincrement operator. (See “Postfix Expressions”.)

Expressions formed with unary operators. Unary operators act on only one operand in an expression. (See “Expressions with Unary Operators”.)

Expressions formed with binary operators. Binary operators act on two operands in an expression. (See “Expressions with Binary Operators”.)

Expressions formed with the conditional operator. The conditional operator is a ternary operator—the only such operator in the C++ language—and takes three operands. (See “Expressions with the Conditional Operator”.)

Constant expressions. Constant expressions are formed entirely of constant data. (See “Constant Expressions”.)

Expressions with explicit type conversions. Explicit type conversions, or “casts” can be used in expressions. (See “Expressions with Explicit Type Conversions”.)

Expressions with pointer-to-member operators. (See “Expressions with Pointer-to-Member Operators”.)