The const qualifier has various uses in C and C++. You can use it to define symbolic constants, to declare data that can be placed in read-only memory, or to constrain the effects of function calls. Judicious use of the const qualifier turns logic errors that would be run-time bugs into compile-time errors that are much easier to correct. Using the const qualifier can make your programs more portable. Occasionally, it can even reduce your program’s code size and execution time.

This paper covers the most common uses for the const qualifier in C and C++, and what const really means in each context. It also suggests guidelines for when to use const, and when not to use it.