Firstly, sample codes:
Case 1:
typedef char* CHARS;
typedef CHARS const CPTR; // constant pointer to chars
Textually replacing CHARS becomes:
typedef char* const CPTR; // still a constant pointer to chars
Case 2:
typedef char* CHARS;
typedef const CHARS CPTR; // constant pointer to chars
Textually replacing CHARS becomes:
typedef const char* CPTR; // pointer to constant chars
In case 2, after textually replacing CHARS, the meaning of the typedef changed. Why is this so? How does C++ interpret this definition?