非0即爲真
#include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
bool _bv = false;
_bv = -1;
if (_bv)
{
cout << "-1 is true" << endl;
}
_bv = 0;
if (_bv)
{
cout << "0 is true" << endl;
}
_bv = 1;
if (_bv)
{
cout << "1 is true" << endl;
}
return 0;
}