Quote:
'void main()' causes "undefined" behavior. Now, what this seemingly innocent statement means is that your worst nightmare may have just started.
main() must return an integer value back to where it was called; not necessarily "the System".
A void function cannot return a value.
Borrowing from Mr. Yogi Berra, you're telling the compiler that when it comes to a fork in the road, it should take it. Say what???
In essence, that's what 'void main()' does. In the American vernacular, "That is, like, so not good!"
Check out Salem's avatar, btw. Pretty much says it all. (I'd mention Prelude, but her blood pressure goes too high when she sees 'void main()'. Far too young. )