+ 1
If anybody tell me the when we use void & int in main fiction?
5 ответов
+ 3
It's true
Because you used void
And void is just void means nothing
So you do not need to return Anything
+ 3
Thank you
+ 2
Hi There,
It's doesn't matter what to use you can chose anything to return
But returning an int is recommend in c++
Because the main function returns the value to the system it's running on and its return type has meanings
0(False) - Every thing is fine
Any other (True)- Some error Has occurred
So better use int
but you can also choose void if you want.
+ 1
but when we used void didn't write the return at the end of program
+ 1
Welcome. ☺️