The const keywoard in C++ indicates that a particular object or variable is not modifiable. It can be used in various contexts:
Const variables
Declaring a variable as const inside of a function indicates that the variable will not be modified inside the function.
Const member functions
Declaring a member function as const, which is done by appending const to the end of the function prototype, indicates that the function is a "read-only" function that does not modify the object for which it is called.
The rule for const viability is that const-ness can be applied to a non-const variable or member function, but once applied it cannot be removed.