title: cannot specify explicit initializer for arrays
body: <p>I'm getting the following compile error... </p>
  
  <pre><code>error C2536: 'Player::Player::indices' : cannot specify explicit initializer for arrays 
  </code></pre>
  
  <p>why is this?</p>
  
  <p><strong>header</strong></p>
  
  <pre><code>class Player
  {
  public:
      Player();
      ~Player();
  
      float x;
      float y;
      float z;
      float velocity;
  
      const unsigned short indices[ 6 ];
      const VertexPositionColor vertices[];
  };
  </code></pre>
  
  <p><strong>cpp</strong></p>
  
  <pre><code>Player::Player()
  :
      indices
      { 
          3, 1, 0,
          4, 2, 1 
      },
      vertices{
          { XMFLOAT3( -0.5f, -0.5f, -0.5f ), XMFLOAT3( 0.0f, 0.0f, 0.0f ) },
          { XMFLOAT3( -0.5f, 0.5f, -0.5f ), XMFLOAT3( 0.0f, 0.0f, 1.0f ) },
          { XMFLOAT3( 0.5f, -0.5f, -0.5f ), XMFLOAT3( 0.0f, 1.0f, 0.0f ) },
          { XMFLOAT3( 0.5f, 0.5f, -0.5f ), XMFLOAT3( 0.0f, 1.0f, 1.0f ) }
      }
  {
  }
  </code></pre>
  
  <p><strong>EDIT TO SHOW MY ATTEMPT AT std::array</strong></p>
  
  <pre><code>std::array&lt;unsigned short, 6&gt; indices;
  std::array&lt;VertexPositionColor, 4&gt;  vertices;
  </code></pre>
  
  <p>can't get this to work either.</p>
  
  <pre><code>error C2661: 'std::array&lt;unsigned short,6&gt;::array' : no overloaded function takes 6 arguments
  </code></pre>
  
  <p>and if I do this in my construct like the other post says:</p>
  
  <pre><code>indices( { 
      3, 1, 0,
      4, 2, 1 
  } ),
  vertices ( {
      { XMFLOAT3( -0.5f, -0.5f, -0.5f ), XMFLOAT3( 0.0f, 0.0f, 0.0f ) },
      { XMFLOAT3( -0.5f, 0.5f, -0.5f ), XMFLOAT3( 0.0f, 0.0f, 1.0f ) },
      { XMFLOAT3( 0.5f, -0.5f, -0.5f ), XMFLOAT3( 0.0f, 1.0f, 0.0f ) },
      { XMFLOAT3( 0.5f, 0.5f, -0.5f ), XMFLOAT3( 0.0f, 1.0f, 1.0f ) }
  } )
  </code></pre>
  
  <p>it crashes the compiler...</p>
  
  <p><strong>EDIT:: Victory!</strong></p>
  
  <p>I put them in my cpp file babeh:</p>
  
  <pre><code>const unsigned short Player::indices[ 6 ] = {
      3, 1, 0,
      4, 2, 1
  };
  
  const VertexPositionColor Player::vertices[ 4 ] = {
      { XMFLOAT3( -0.5f, -0.5f, -0.5f ), XMFLOAT3( 0.0f, 0.0f, 0.0f ) },
      { XMFLOAT3( -0.5f, 0.5f, -0.5f ), XMFLOAT3( 0.0f, 0.0f, 1.0f ) },
      { XMFLOAT3( 0.5f, -0.5f, -0.5f ), XMFLOAT3( 0.0f, 1.0f, 0.0f ) },
      { XMFLOAT3( 0.5f, 0.5f, -0.5f ), XMFLOAT3( 0.0f, 1.0f, 1.0f ) }
  }
  </code></pre>