In Visual C++, how can I initialise a constant array inside of a class?
This is an example of how to do it outside of a class:
const char k_colors[] =
{
'R',
'G',
'B',
};
Now how do I need to change that? (I tried putting static in front of it, which didn't work)
Edit: You're right, I should just use single characters.
const char*and"Red", etc?char *and e.g."Red"?staticand initialize it separately.charshould bechar*