Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
Keyword that ends a function.
Depending on the function, return might return a
value.
If a
function has no return value (that is, a return type of void), one can omit the
final return.
The
function main is
special. It returns an integer
error code of the program, where a zero denotes a no-failure run. When main's closing bracket is reached, the effect is
equivalent to (Standard, 3.6.1.5):
Therefore,
the following two pieces of code are equivalent:
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.