title: static const C++ class member initialized gives a duplicate symbol error when linking
body: <p>I have a class which has a static const array, it has to be initialized outside the class:  </p>
  
  <pre><code>class foo{  
  static const int array[3];  
  };    
  const int foo::array[3] = { 1, 2, 3 };
  </code></pre>
  
  <p>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.<br>
  How can I share this static const array between all instances of foo? I mean, that's the idea of a static member.</p>