The compiler interprets your line as a function declaration, so it prompts you: type without parameters (without types) For example: int main(int argc, char *argv[] ) {
int main(argc, argv);
return 0;
} will prompt line 3 [Warning] parameter names (without types) in function declaration [enabled by default] int main(int argc, char *argv[]) {
The compiler interprets your line as a function declaration, so it prompts you: type without parameters (without types)
For example:
int main(int argc, char *argv[] )
{
}
will prompt line 3 [Warning] parameter names (without types) in function declaration [enabled by default]
int main(int argc, char *argv[])
{
}
declares no ambiguity and no warning.
There is no need to write the return value type when calling a function, just write the function name and parameters directly
I’m also confused, there’s a word limit on answering questions
Because the call itself does not add a type, adding a type is a declaration.