Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) declaration

 

'A declaration introduces a name into a program' [1].

 

There are two types of declarations:

  1. A variable declaration is naming a variable to be used.
  2. A function declaration is naming a function to be defined.

 

 

 

 

 

Example

 

In the code below, the function MagicFunction and the integer x are declared.

 

void MagicFunction();

int main()
{
  int x;
}

 

 

 

 

 

 

References

 

  1. John Lakos. Large-Scale C++ Software Design. 1996. ISBN: 0-201-63362-0. Chapter 1.1.1

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict