title: What is the convention for main function return values in C++?
body: <p>I was reading sample code and found that for error messages they used <code>return -1;</code> and for the main function they used <code>return 0;</code>. However, when I substituted the main function return value to <code>return 10000;</code>, it still built and run with no errors. Does this mean that return values can be arbitrarily chosen and has no meaning for the computer (Excluding the case where you are using the return value for some user-defined operation)? What is the usual convention in assigning return values for different cases?</p>