title | ms.custom | ms.date | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | manager | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Types of Expressions | Microsoft Docs |
11/04/2016 |
|
index-page |
|
|
1e7540b0-8fdb-49ab-b3e1-6ec439ff473a |
6 |
mikeblome |
mblome |
ghogen |
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.