下面的代码应该可以工作吗?
bool b1 = true;
bool b2 = 1 < 2;
if (b1 == b2)
{
// do something
}
我怀疑并非所有“真”都是平等的。
最佳答案
是的。所有真都是平等的。
关于c++ - 可以在 C++ 中比较两个 boolean 值吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2192253/
标签 c++ comparison boolean
下面的代码应该可以工作吗?
bool b1 = true;
bool b2 = 1 < 2;
if (b1 == b2)
{
// do something
}
我怀疑并非所有“真”都是平等的。
最佳答案
是的。所有真都是平等的。
关于c++ - 可以在 C++ 中比较两个 boolean 值吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2192253/