
C++如何在main函数中调用bool类型返回值。。。。
急求详细解释!
#include
using namespace std;
bool fun(int i)
{
if (i<0)return false;
return true;
}
void main()
{
bool b;
b = fun(2);
if (b) cout <档慧< "true"帆团;else cout << "行轿答false";
}
bool b;
b=fun();
#include
bool main(void)
{
return true;
}