const char* const sessionList[] = { ... };
better to write like:
char const* const sessionList[] = { ... };
Type sessionList[0] - char const* const .
Therefore, the type &sessionList[0] is char const* const* .
You can use:
char const* const* ptr = &sessionList[0];
or
char const* const* ptr = sessionList;
Declares a pointer to sessionList elements. If you want to declare a pointer to the entire array, this should be:
char const* const (*ptr)[4] = &sessionList;
source share