+ 1
Why we use void for main function... What the use of void in main??
4 Answers
+ 9
Linking to @Ace's answer:
https://www.sololearn.com/Discuss/288609/?ref=app
+ 5
void is a datatype. the main function does not return a value if you use "void" . For other datatypes like int,float you have to return something at the end.. This not just or c++.
+ 3
as far as I know, int is used for main function to return the status of the program(i.e. return 0; means program ran to the end successfully)
I don't think void main in for c++
+ 2
http://www.stroustrup.com/bs_faq2.html#void-main
Don't use void main as it is not C++.