-
const char *ptr
defines a pointer to a character constant.
The pointer points can be modified, but the value pointed to by the pointer cannot be modified. -
char const *ptr
is equivalent to 1 -
char * const ptr
defines a pointer constant to a character.
The pointer point cannot be modified, and the value pointed to by the pointer can be modified
The difference between const char *, char const *, char * const in C/C++
Guess you like
Origin blog.csdn.net/qq_42138927/article/details/107039499
Recommended
Ranking