1. 程式人生 > >from c to c++: using the boolean

from c to c++: using the boolean

<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
        零為零
*/


執行結果: