Meaning of "const"

Wiritng const in fornt of the variable like this:
const int a = 3;
…means that a will not change it’s value trought the rest of the code. Like constants in Maths, pi is always = 3.14. If we write pi=5, that would be just wrong. That’s why our program won’t even run, the compiler will give us an error.

1 Like

Good job!