正如下边的代码,bool的变量是true或者false两种值,是逻辑判断用的。
bool success = true; //
// 如果不成功(success)
if (!success)
{
// ...
std::cout << "木有成功!" << std::endl;
}