如果加了就会出现
[Warning] parameter names (without types) in function declaration [enabled by default]
迷茫2017-04-17 14:48:50
編譯器把你那一行理解成函數宣告(function declaration)了,所以提示你:沒有參數的型別(without types)
例如:
int main(int argc, char *argv[] )
{
int main(argc, argv);
return 0;
}
則提示 line 3 [Warning] parameter names (without types) in function declaration [enabled by default]
int main(int argc, char *argv[])
{
int main(int argc, char *argv[]);
return 0;
}
則申明無歧義,沒有警告。