const declaration and use
n
const float
PI
= 3.1416;
n
const int
currentYear
= 2000;
n
Once declared, a const variable can be used
in any C++ statement in place of the
number it represents.
n
Circum = 2 *
PI
* radius;
n
Age =
currentYear
– YearOfBirth;
n