Remember One thing...
If you cast away the constness of an object that has been explicitly declared as const, and attempt to modify it, the results are undefined, But compiler will allow to compile.
for more detail you can refer ...
http://publib.boulder.ibm.com/infoce...const_cast.htm