J
Joseph Paterson
Hi all,
I'm having some trouble with the following code (simplified to show
the problem)
class Counter
{
protected:
int m_counter;
}
template <class K, class V>
class IMap : public Counter
{
// Virtual function declarations
}
template <class K, class V>
class HashMap : public IMap<K, V>
{
// Implementation of the virtual functions declared in IMap
}
Now when I'm implementing the functions in the HashMap class, I can't
seem to access the m_counter member variable by just using m_counter
(I get an undeclared reference from GCC), but when I use this-
Could anybody help me out with this one?
Thanks,
Joseph Paterson.
I'm having some trouble with the following code (simplified to show
the problem)
class Counter
{
protected:
int m_counter;
}
template <class K, class V>
class IMap : public Counter
{
// Virtual function declarations
}
template <class K, class V>
class HashMap : public IMap<K, V>
{
// Implementation of the virtual functions declared in IMap
}
Now when I'm implementing the functions in the HashMap class, I can't
seem to access the m_counter member variable by just using m_counter
(I get an undeclared reference from GCC), but when I use this-
m_counter, then it works fine.
Could anybody help me out with this one?
Thanks,
Joseph Paterson.