Beginner's Guide to Functions in C++ (Page 1 of 5 )
All C++ programs use functions. The first program you ever wrote in C++ used a function you declared as "Main". Main is called by the computer operating system. Main is usually declared as an integer-returning function, and that is why your programs end when Main returns a '0'. When Main returns a zero, the operating system is told that everything went OK. Please remember that Main is a REQUIRED function in a C++ program, so it must be used. Therefore, your programs must at least use a function called Main!