Function definitions differ from function declarations in that they supply function bodies—the code that makes up the function.
function-definition:
decl-specifiersopt declarator ctor-initializeroptfct-body
fct-body:
compound-statement
As discussed in “Functions”, the form of the declarator in the syntax is:
dname(argument-declaration-list)cv-mod-listopt
The formal arguments declared in argument-declaration-list are in the scope of the function body.
Figure 7.3 shows the parts of a function definition. The shaded area is the function body.
The cv-mod-list element of the declarator syntax specifies how the this pointer is to be treated; it is only for use with class member functions. (For more information about the cv-mod-list, see “const and volatile Pointers” and “Memory-Model Modifiers and Member Functions” in Appendix B, on topic .)
The ctor-initializer element of the syntax is used only in constructors. Its purpose is to allow initialization of base classes and contained objects. (For more information about use of ctor-initializer, see “Initializing Bases and Members” in Chapter 11, on topic .)