+ 2
Why main function must return integer?
3 Réponses
+ 11
So that it indicates to the main function that the code ran without any error.
Generally return 0 is used.
https://www.sololearn.com/Discuss/220394/?ref=app
0
It's because you're probably using "int main()". You need to return a value if you're using int. If you use "void main()" you actually don't need to return anything at all! Hope it helps :D
0
it cause errors if i use "void main()", even if if i use "long int main()"