title: Initialize an array in C++ header file
body: <p>I'm trying to initialize an array in a class' header file:</p>
  <pre><code>class C {
      private:
          static float p[26] = {
              0.09, 0.02, 0.02, 0.04, 0.12, 0.02, 0.03, 
              0.02, 0.09, 0.01, 0.01, 0.04, 0.02, 0.06, 
              0.08, 0.02, 0.01, 0.06, 0.04, 0.06, 0.04, 
              0.02, 0.02, 0.01, 0.02, 0.01
          };
  ...
  </code></pre>
  <p>I'm getting the following error(s) from g++:</p>
  <blockquote>
  <p>C.h:15:33: error: a brace-enclosed initializer is not allowed here before ‘{’ token</p>
  <p>C.h:20:9: sorry, unimplemented: non-static data member initializers</p>
  <p>C.h:20:9: error: ‘constexpr’ needed for in-class initialization of static data member ‘p’ of non-integral type</p>
  </blockquote>
  <p>I'm forced to use <code>c++0x</code>; how can I define this array without doing <code>p[0]</code>, <code>p[1]</code>, etc.?</p>