First of all, what\'s the difference between:
(1) const char*
(2) char const*
(3) const char const*
I\'m fairly certain I understand this f
const char * and char const * have the same meaning: the pointed value is const, but the pointer itself can be changed to another address. After initialization, *p = 'X'; is invalid (does not compile), and p = &x; (where x is a variable of type char) is valid (it compiles).
So const char const * indicates twice the same thing.
char * const: the pointed value can be changed, but the pointer itself is const. It cannot be modified to point to another address. After initialization, *p = 'X'; is valid, and p = &x; is not.
const char * const and char const * const have the same meaning: both pointed value and pointer are const. Neither *p = 'X'; nor p = &x; are valid after initialization.