I'm new to CPP, can't find a simple documentation on how to declare a private constant class attribute, and if it should go on the .h
or .m
Here's what I have on my Horse.h
:
class Horse {
private:
static const int body_vertex_quantity = 24;
float left_ear_vertex_array[ears_vertex_quantity][2] = {
//
};
public:
draw();
}
But I'm getting
cannot specify explicit initializer of arrays
I have made my research in the following links, but I don't understand the syntax or what they're doing since I'm new to cpp
Initializing a member array in constructor initializer
Error: cannot specify explicit initializer for array
Workaround for error C2536: cannot specify explicit initializer for arrays in Visual Studio 2013