A constant expression is an expression that always evaluates to a constant (it is evaluated at compile-time and it must evaluate to a constant that is in the range of representable values for its type). Constant expressions are evaluated just as regular expressions are. You can use a constant expression anywhere that a constant is legal. The syntax for constant expressions is:
constant-expression: Conditional-expression
Constant expressions cannot contain any of the following operators, unless the operators are contained within the operand of a sizeof operator:
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|