I tried the following line:
static const const char* values[];
But I get the following warning on VC++ warning C4114:
same type qualifier used more than once.
What is the correct declaration? The goal is to create an immutable array of c strings.
You wrote
const constinstead ofstatic const char* const values[];(where you define the pointer and the underlying values asconst)Also, you need to initialize it:
static const char* const values[] = {"string one", "string two"};