I can't for the life of me figure out how to do this properly. I have a class that needs to store some constants (text that corresponds to values in an enum type) - I have it declared like this (publicly) in my class:
const static char* enumText[];
And I'm trying to initialize it like this:
const char* MyClass::enumText[] = { "A", "B", "C", "D", "E" };
However gcc gives me the following error:
'const char* MyClass::enumText[]' is not a static member of 'class MyClass'
What am I doing wrong? Thanks!