Hello again,
Still trying to compile this codewarrior project. I've gotten to some code from the Wild Magic library that I use, and it is choking on the following:
error: 'm_afTuple' was not declared in this scope
from this code:
template <class Real> Vector2<Real>::Vector2 (Real fX, Real fY) { m_afTuple[0] = fX; m_afTuple[1] = fY; }
The class Vector2 is a subclass of Vector, like this:
template <class Real> class WML_ITEM Vector2 : public Vector<2,Real> { ... };
And the offending variable m_afTuple is defined in the base class template:
template <int N, class Real> class WML_ITEM Vector { public: ...
protected: // support for comparisons int CompareArrays (const Vector& rkV) const;
Real m_afTuple[N]; };
I thought that the 'protected' status was causing the error, but I moved it into the public section and still got the error. Does anyone know what could be causing the error? Is it something to do with templates maybe? Thanks very much, Bob
|