View Single Post
Old 04-22-2003, 04:16 PM   #7 (permalink)
agh
Registered User
 
Join Date: Apr 2003
Posts: 30
agh is on a distinguished road
You could do this:

Code:
void f()
{
    char c = 'a';    
    const char* ccp = &c;
    char* cp = const_cast<char*>(ccp);
    *cp = 'b';
}
But, as joe_bruin said, you shouldn't do that, because things are marked const for a reason.
agh is offline   Reply With Quote