Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
'A definition of a function
tells the compiler how the function
works. It shows what instructions are executed for the function.' [3]
'A definition provides a unique description of an entity (for example,
type, instance,
function) within a program' [1].
There are two types of definitions:
-
A variable definition is a
variable declaration with
specifying an initial value
-
A function definition is a
function declaration with
specifying the function body
A variable definition is a
variable declaration with
specifying an initial value.
A function definition is
a function declaration
with specifying the function body.
- John Lakos. Large-Scale C++ Software Design. 1996. ISBN: 0-201-63362-0. Chapter 1.1.1
- Scott Meyers. Effective C++ (3rd edition). ISBN: 0-321-33487-6. Item 26: 'Postpone variable definitions as long as possible'.
- Joint Strike Fighter Air Vehicle C++ Coding Standards for the System Development and Demonstration Program. Document Number 2RDU00001 Rev C. December 2005. 4.3.15: 'A definition of a function tells the compiler how the function works. It shows what instructions are executed for the function.'
- Paul Deitel, Harvey Deitel. C++11 for programmers (2nd edition). 2014. ISBN: 978-0-13-343985-4. Chapter 3.1, Common Programming Error 3.1. page 39: 'Forgetting the semicolon at the end of a class definition is a syntax error.'
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.
