What is the proper signature of the main function in C++? What is the correct return type, and what does it mean to return a value from main? What are the allowed parameter types, and what are their meanings?
这是系统特定的吗?这些规则会随着时间而改变吗?如果我违反它们会发生什么?
可能重复:
主要的正确声明是什么?
如果没有特别引用任何代码,我正在寻找以下示例的解释:
#include <iostream>
int main()
{
std::cout << "Hello world" << std::endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我不明白是什么return 0.你能用尽可能简单的英语解释一下吗?