I'm learning const and pointers playing with examples. From this thread I read that:
const char* the_string : I can change the char to which the_string points, but I cannot modify the char at which it points.
const char* a = "test";
char* b = "other";
a = b;
cout << a << endl; //prints "other"
You can set
a to point at something else since
a is itself not
const: only the data to which it points is
b = a would not be allowed, since you'd be casting away
If you want to prevent
a = b then write
const char* const a = "test";