I\'m getting the following compile error...
error C2536: \'Player::Player::indices\' : cannot specify explicit initializer for arrays
why
The size of the array needs to be defined in the class definition. C++ doesn't support variable sized arrays, at least, not yet:
class Player
{
public:
// ...
const unsigned short indices[ 6 ];
const VertexPositionColor vertices[4];
};
Assuming a suitable definition of VertexPositionColor this should be OK (it compiles with gcc and clang using -std=c++11).