Function Declarations
Learn how to declare functions in C++.
We'll cover the following...
We'll cover the following...
Declaration of a function in C++
Before we discuss calling functions, we must discuss declarations. Programs written in C++ are executed in logical order from the top down. A statement can only use symbols, or named constructs like functions, that are declared in code that has already been executed. Simply put, the compiler must be aware of the name used to describe a function before that function can be called in the code.
For example, to allow main
to call functions that are ...