Im a pretty new C++ programmer, but i'm learning very quickly. Id like to know what:
and how it is different fromCode:int main(void)
what does it do that main() cant do.Code:main()
Im a pretty new C++ programmer, but i'm learning very quickly. Id like to know what:
and how it is different fromCode:int main(void)
what does it do that main() cant do.Code:main()
int main(void)
This declares that main returns an integer. main() should always return an integer.
This is optional, it'd be the same if you left it out... included for clarity
As for just plain main(), it looks like a syntax error to me. No return type.
in c, main () is the same as int main (), because a function with no return type is implicitly assumed to return intOriginally posted by Eibro
int main(void)
This declares that main returns an integer. main() should always return an integer.
This is optional, it'd be the same if you left it out... included for clarity
As for just plain main(), it looks like a syntax error to me. No return type.
hello, internet!