okay, i'll just show you the code first:
Code:
template <class T>
class PULT_Layer
{
public:
virtual ~PULT_Layer() { } // Probably needed
virtual void clear() = 0;
virtual UINT return_debug_code () const { return 0; }
PULT_Layer<T> * m_pParent;
UCHAR m_uc_index_in_parent;
UINT number_slots_used;
};
template <class T>
class PULT_NonFinal_Layer : public PULT_Layer<T>
{
public:
PULT_NonFinal_Layer(PULT_Layer<T> * pParent, UCHAR uc_index_in_parent);
virtual ~PULT_NonFinal_Layer();
virtual void clear();
virtual UINT return_debug_code () const { return 1; }
PULT_Layer<T> * layer[256];
};
now, here's the definition for the PULT_NonFinal_Layer constructor:
Code:
template <class T>
PULT_NonFinal_Layer<T>::PULT_NonFinal_Layer(PULT_Layer<T> * pParent, UCHAR uc_index_in_parent)
{
m_pParent = pParent;
m_uc_index_in_parent = uc_index_in_parent;
number_slots_used = 0;
for (UINT ui = 0; ui < 256; ++ui) { layer[ui] = 0; }
}
this works just dandy under MSVCPP6, but when attempting to compile this with dev-cpp i get the following error:
POG_UID.h: In constructor `PULT_NonFinal_Layer<T>::PULT_NonFinal_Layer(PULT_ Layer<T>*, UCHAR)':
POG_UID.h:112: error: `m_pParent' undeclared (first use this function)
is there something that i need to do to the code?