Hacker News new | ask | show | jobs
by MeadowTheory 4160 days ago
I feel like this is a silly question, but what is the reason for all of the return 1; statements at the ends of the mains? I thought 0 as a return code for success was pretty near universal. Is there something obvious I'm missing here? Not really a C/C++ guru.
2 comments

In C++, "return 0" from main is actually the default (i.e. you don't need to explicitly return), same in C99.
fixed, thanks