I've created a const array of const pointers like so:
const char* const sessionList[] = {
dataTable0,
dataTable1,
dataTable2,
dataTable3
};
What is the correct syntax for a regular non-const pointer to this array? I thought it would be const char**, but the compiler thinks otherwise.
const char * *would be equivalent to your array, since this is what your array will decay to when passed to a function. You'd need an extra indirection to get a pointer to the array. Or something likeconst char * [] *, but I'm not sure if that one is valid&sessionListisconst char * const (*)[4], but I'm struggling to declare a variable with such a type.const char * const *when you use it in most contexts (everything exceptsizeof,decltypeand&)const