C++ Programming/Programming Languages/C++/Code/Keywords/const cast

The const_cast keyword can be used to remove the const or volatile property from an object. The target data type must be the same as the source type, except (of course) that the target type doesn't have to have the same const qualifier. The type TYPE must be a pointer or reference type.


 * Syntax

For example, the following code uses const_cast to remove the const qualifier from an object: