Monday, November 22, 2010

Int Implicitly Converted to bool

In the statement: if (1) {} The '1' is implicitly converted to bool.

Also the value of (true == 1) is true.

Reference: http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=176

No comments:

Post a Comment