what's wrong with this syntax? sorry for the newbie question.
source:
Level::Level()
{
NintyDegreeDirections[4] =
{
(float)(2*(Math.PI)),
(float)(3*(Math.PI)/2),
(float)Math.PI,
(float)Math.PI/2
}
...rest of class
header:
//all necessary includes
class Level
{
private:
static const float NintyDegreeDirections[4];
...rest of header
how do I have an array as a class member? I'm converting from C#
staticwill make it a class member, which means that you don't initialize it on a per-instance basis, but once, for the whole class. You trying to initialize it in the constructor suggests you might want an instance member instead of a class member, but I'm not sure.