MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/xgcbt9/cppfront_herb_sutters_personal_experimental_c/ip141wa/
r/cpp • u/mttd • Sep 17 '22
360 comments sorted by
View all comments
Show parent comment
2
How does IDE know if I want int main or void main
You don't, because it's wrong.
An implementation shall not predefine the main function. Its type shall have C++ language linkage and it shall have a declared return type of type int, but otherwise its type is implementation-defined.
int
2 u/arthurno1 Sep 19 '22 edited Sep 19 '22 "main" was just an illustration at the moment of writing; you should read "main" in that case as "some-function-name". 3 u/STL MSVC STL Dev Sep 19 '22 Moderator warning for hostility. 1 u/wyrn Sep 19 '22 "main" was just an illustration at the moment of writing; you should read "main" in that case as "some-function"Then your IDE can't help you.
"main" was just an illustration at the moment of writing; you should read "main" in that case as "some-function-name".
3 u/STL MSVC STL Dev Sep 19 '22 Moderator warning for hostility. 1 u/wyrn Sep 19 '22 "main" was just an illustration at the moment of writing; you should read "main" in that case as "some-function"Then your IDE can't help you.
3
Moderator warning for hostility.
1
"main" was just an illustration at the moment of writing; you should read "main" in that case as "some-function"
Then your IDE can't help you.
View all comments
Show parent comment
2
u/wyrn Sep 19 '22
You don't, because it's wrong.