Declaring functions

Declaring functions

A function declaration introduces the function name and its type. A function definition associates the function name/type with the function body.

Function declaration

Function declarations may appear in any scope. A function declaration at class scope introduces a class member function (unless the friend specifier is used), see member functions and friend functions for details.

The type of the function being declared is composed from the return type (provided by the decl-specifier-seq of the declaration syntax) and the function declarator.<