so if I have something like this in C++:
char A_char = 'A';
char * myPtr = &A_char;
const char * myPtr = &char_A; //pointers that point to constants
char * const myPtr = &char_A; //constant pointers
const char * const myPtr = &char_A; //constant pointers that point to constants
I was wondering where and why we use "pointers that point to constants", "constant pointers", and "constant pointers that point to constants" in programming. I know the differences between them and their syntax, but I have no idea where and why we use them. Would you be able to explain? Thanks guys.