<<< First C++ program, cont. | Index | Creating First Microsoft VC++ Project >>> |
#include <iostream>
int main()
{
std::cout << "Hello, World!";
return 0;
}
The return 0; statement stops execution of the main function.
The return passes numeric value zero back to the caller of our program -- the operating system.
Zero indicates success.
Non-zero usually represents a well-known error code , signalling an unusual termination condition of the program (for example, "not enough memory," or "bad input parameters," etc.)
<<< First C++ program, cont. | Index | Creating First Microsoft VC++ Project >>> |