Well, unfortunately the answer to many language semantic questions is "it depends on the compiler implementation" but in general a mature C++ compiler will yell at you for not returning a value when you said that the function should.
About main returning an int, this is only useful if the OS needs to examine the return value (either requested by a script or other reason), but my point was only that it's the standard and it's probably a good idea to do it this way. No reason not to.
|