In C++ Primer book, there is an explanation on type aliases as:
typedef char *pstring;
const pstring cstr = 0; // cstr is a constant pointer to char
They say that the following is a wrong interpretation:
const char *cstr = 0;
However it makes sense to me, to replace the typedef alias with its original meaning.
In a normal scenario without type aliasing a constant pointer is defined as:
char *const cstr = 0;
Why is it constant pointer rather than pointer to const?
Can anyone explain in clear terms because the book doesn't seem to clarify it much.