#include <iostream>
using namespace std;
/*
* test the return value of the main
* the return type of the main must be int,and 0 is normal,others express the type of error
*/
int main()
{
return 0;
//return 1;
}
当main函数返回值为0时,表示程序正常退出
#include <iostream>
using namespace std;
/*
* test the return value of the main
* the return type of the main must be int,and 0 is normal,others express the type of error
*/
int main()
{
//return 0;
return 1;
}
当 main 函数返回非 0 时,表示程序异常退出,且返回值表示错误类型,由系统定义