Const

This lesson will explain what the const keyword does.

Definition

The const keyword affects the behavior of a variable. Any variable initialized with the const keyword cannot be modified later on. It is constant.

const int i = 10;
i = 20; // "Error: Cannot modify a constant variable"

Variables or ...