TITLE: Correct prototype for main() PROBLEM: What is the correct prototype for main()? RESPONSE: harrison@lclark.edu (Mark Harrison), 2 Sep 92 It should make no difference whether you try 'int' or 'void' as long as main() returns the correct value (or doesn't with void.) RESPONSE: steve@taumet.com (Steve Clamage) It ought to make a difference, since the only valid definitions of main() have return type 'int' (explict or implied). This is the case in both Standard C and in C++. If you write, for example, void main(){ } The compiler is obligated to diagnose an error in C and C++. The return value from main() is supposed to be supplied to the calling environment in some implementation-defined way. Some systems appear not to care whether you return a value, but some report error conditions based on the garbage value which main() otherwise implicitly returns.