It's probably better to not have colors dynamically allocated in the first place because it'll prevent the compiler from being able to do various optimizations. Ideally:
class Color
{
public:
static int const BLACK[3];
};
int const Color::BLACK[3] = {0,0,0};
However if you do want them on the heap then it depends on whether you want the pointer to be const, the values const or both!
If you want the pointer and values to be const then you may have to do this:
class Color
{
public:
static int const * const BLACK;
};
int const * const Color::BLACK = new int[3]{0,0,0};
To be honest I am unsure of what context would demand the pointer and allocation. It seems unnecessary.
EDIT: For a pre-C++11 compilers you could do something like this:
int * make_black()
{
int * color = new int[3];
color[0] = color[1] = color[2] = 0;
return color;
}
class Color
{
public:
static int const * const BLACK;
};
int const * const Color::BLACK = make_black();