I have a class which has a static const array, it has to be initialized outside the class:
class foo{
static const int array[3];
};
const int foo::array[3] = { 1, 2, 3 };
But then I get a duplicate symbol foo::array in foo.o and main.o
foo.o hold the foo class, and main.o holds main() and uses instances of foo.
How can I share this static const array between all instances of foo? I mean, that's the idea of a static member.