Beginner's Guide to Functions in C++
(Page 1 of 5 )
Rich is a self-confessed C++ guru! In this article he shows us how functions work in C++ and how to use them in everyday C++programming.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!
Next: A Basic Program >>
More C++ Articles
More By Rich C.