Hello experts
Why is not possible to compile the code for class FloatArray below.
I get error the following compile error
c:\Documents and Settings\Tony\kau\cplusplus\test10\Boolean.h(90): error
C2065: 'length' : undeclared identifier
If a instead use the FloatArray as a class template and add
this line template <int size> just before the class definition.
Then I get no errors.
class FloatArray
{
public:
FloatArray(int size) : length(size)
{}
private:
float array[length];
};