TITLE: returning from main (Newsgroups: comp.lang.c++.moderated, 3 Oct 96) KUEHL: kuehl@horn.informatik.uni-konstanz.de (Dietmar Kuehl) As far as the missing 'return' statement goes: Every function returning something different than 'void' results in "undefined behavior" if the path of execution floats off this function without a 'return' statement. Well, there is on exception to this rule: If the path of execution floats off 'main()' without a return statement (as would e.g. be the case in the example on page 18), this is equivalent to 'return 0;' (or 'return EXIT_SUCCESS;'). However, I think it is bad style to use this rule... (and I wouldn't teach it...) KANZE: kanze@gabi-soft.fr (J. Kanze) It's also worth pointing out that this rule represents a recent change, and is probably not implemented in very many compilers yet.