description | title | ms.custom | ms.date | helpviewer_keywords | ms.assetid | |
---|---|---|---|---|---|---|
Learn more about: Types of Expressions |
Types of Expressions |
index-page |
11/04/2016 |
|
1e7540b0-8fdb-49ab-b3e1-6ec439ff473a |
C++ expressions are divided into several categories:
-
Primary expressions. These are the building blocks from which all other expressions are formed.
-
Postfix expressions. These are primary expressions followed by an operator — for example, the array subscript or postfix increment operator.
-
Expressions formed with unary operators. Unary operators act on only one operand in an expression.
-
Expressions formed with binary operators. Binary operators act on two operands in an expression.
-
Expressions with the conditional operator. The conditional operator is a ternary operator — the only such operator in the C++ language — and takes three operands.
-
Constant expressions. Constant expressions are formed entirely of constant data.
-
Expressions with explicit type conversions. Explicit type conversions, or "casts," can be used in expressions.
-
Casting. Type-safe "casts" can be used in expressions.
-
Run-Time Type Information. Determine the type of an object during program execution.