2 out of 3 rated this helpful - Rate this topic

Unary Plus Operator: +

Grammar

unary-expression:
+ cast-expression

The result of the unary plus operator (+) is the value of its operand. The operand to the unary plus operator must be of an arithmetic type.

Integral promotion is performed on integral operands. The resultant type is the type to which the operand is promoted. Thus, the expression +ch, where ch is of type char, results in type int; the value is unmodified. See Integral Promotions for more information about how the promotion is done.

See Also

Expressions with Unary Operators | C++ Operators | Operator Precedence and Associativity

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.