How to create a static const array of const char*
Try
static const char* const values[];
The idea is to put the two const
s on either side of *
: the left belongs to char
(constant character), the right belongs to char*
(constant pointer-to-character)
You wrote const const
instead of static const char* const values[];
(where you define the pointer and the underlying values as const
)
Also, you need to initialize it:
static const char* const values[] = {"string one", "string two"};