7.3 — Local variables

In lesson , we introduced local variables, which are variables that are defined inside a function (including function parameters). It turns out that C++ actually doesn’t have a single attribute that defines a variable as being a local variable. Instead, local variables have several different properties that differentiate how these …

5.1 — Constant variables (named constants)

Introduction to constants In programming, a constant is a value that may not be changed during the program’s execution. C++ supports two different kinds of constants: Named constants are constant values that are associated with an identifier. These are also sometimes called symbolic constants. Literal constants are constant values that …