#Previous question #Index of C++ Questions #Next question

const cast is used to convert a constant variable a pointer pointing to a non constant variable.

const int c = 0;
int *i_ptr ;
i_ptr = const_cast<int *>(&c);

You have viewed 1 page out of 62. Your C++ learning is 0.00% complete. Login to check your learning progress.

Most popular topics (must visit)

Useful links for students