const/static members in classes
I couldn't declare a class like this
class a { public: const float[4] anArray = { 1.1f, 2.2f, 3.3f, 4.4f }; }; I don't see why there is a problem. A class cannot contain constants? Any comments are welcome Thanks Jack |
try initialising the constant in the constructor.
or make them static const and initialise them as you would other static member variables. |
'[4]' needs to be after 'anArray'.
ta0kira |
All times are GMT -5. The time now is 12:14 AM. |