<pre name="code" class="cpp">/*
filename: form c to c++ 1
function: using the boolean
*/
#include <iostream>
using namespace std;
int main()
{
bool result;
//result = true;
result = 18;
//result = -1;
//result = 0;
cout << result <<endl;
return 0;
}
/*
bool类型
非零为1
零为零
*/
运行结果: