+ 1

If anybody tell me the when we use void & int in main fiction?

2nd Dec 2018, 2:58 PM
Sharan
5 ответов
+ 3
It's true Because you used void And void is just void means nothing So you do not need to return Anything
2nd Dec 2018, 3:17 PM
Bad_Bits
Bad_Bits - avatar
+ 3
Thank you
2nd Dec 2018, 3:18 PM
Sharan
+ 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.
2nd Dec 2018, 3:13 PM
Bad_Bits
Bad_Bits - avatar
+ 1
but when we used void didn't write the return at the end of program
2nd Dec 2018, 3:15 PM
Sharan
+ 1
Welcome. ☺️
2nd Dec 2018, 3:18 PM
Bad_Bits
Bad_Bits - avatar