not_and_not

#include <iostream>
using namespace std;

void main()
{
int i = 10;

cout<<(!!i); //same as cout<<((bool)i). Realy the same for the same of the disassembly of the two kinds.
system("pause");
}

output is 0(if == 0) or 1(if != 0).

posted on 2012-02-24 10:34  shizuka  阅读(122)  评论(0编辑  收藏  举报

导航