Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Re: What does !! do? (http://www.velocityreviews.com/forums/t956847-re-what-does-do.html)

Balog Pal 01-23-2013 07:57 PM

Re: What does !! do?
 
On 1/23/2013 4:24 PM, Bint wrote:
> I haven't seen this syntax before. What does "!!" do in C++?
>
> As in this statement
>
> int t = !!(x & size);


!! converts to bool. You can see many uses with WIN32 API that has
type BOOL that is really int and can have all kind of values.
!! makes sure those decay to true/false (1/0).


All times are GMT. The time now is 03:12 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.