int main(void) 指此函数的参数为空,不能传入参数,若输入参数则会出错,但必须要有返回值,如return 0;。 int main()可以传入参数,程序需要返回值。 但在c++中二者没有区别。