what are you trying to accomplish? you have a pointer of type 'const char *' and you want a pointer of type 'char *' to point to the same thing? this is a bad idea. things are marked const for a reason (usually because they are read-only, or supposed to be), and therefore assigning it to a non const will mean trouble.
Code:
void foo()
{
const char *x = "dude";
char *y;
y = (char *)x; // cast to type 'char *'
cout << y << endl;
}
note that in this case, if you try to modify y (or x), you will crash your program.
Code:
y = (char *)x; // cast to type 'char *'
y[0] = 'r'; // segmentation fault, crash