#include #include using namespace std; int main( ) { const string h = "hello"; // two failed attempts to change h // h[ 0 ] = 'j'; // does not compile, thankfully // string & href = h; // does not compile, thankfully // third time is a charm string & ref = const_cast ( h ); ref[ 0 ] = 'j'; cout << h << endl; // prints jello return 0; }