I'm getting a "Function should return a value" warning in the end of main(). I'm weirded out. Is the main() function supposed to return a value? (like, "return 0;" or just a "return" statement, maybe?) As far as I know, functions (not the void ones) are the ones required to return a value. Correct me if I'm wrong here, and please point out my mistake as well. I remove a couple of lines from the source code below, if you don't mind...
Okay, so I added a "return;" statement to the end of my main() and that fixed it. I just wanna clarify if that return statement was a requirement for the termination of the program?
The return can be implicit but the warnings will usually be compiler-dependant.
Though void returning main functions will work, the C++ standard requires that main be an integer returning function (the parameters are optional by the standards but necessary if you ask me).
EDIT: Wrote this as you wrote your response. I'm not clued up on the C standard, I'm afraid.