from c to c++: using the boolean

来源:互联网 发布:java数据源配置 编辑:程序博客网 时间:2024/05/16 12:22
<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        零为零*/


运行结果:

0 0
原创粉丝点击