2012-04-02, 10:35 AM
Haseo Wrote:I'm worse. xP
Ah, return 0 is the part that keeps the window from closing on its own, isn't it? I didn't know you could put the using namespace std; part inside the main function, I thought it had to be waay above. o
"using namespace std;" can be put anywhere in the project. The place where you put it can limit its scope, however.
"return 0" is not required for C++ because C++ will automatically return 0 for you, unlike C. Returning 0 is best used for compatibility as other programs may depend on the return 0 (EXIT_SUCCESS) or 1 (EXIT_FAILURE) to determine what to do next. You can return any integer you like to determine an end-of-program state. Returning 0 is just the preferred success mechanism.
