SetOfCells
uses cellParent
- which either does not define template <class T> T get(int cellIndex)
or it defines it but it is not overridden in the cell
class.
Note it is not possible to do what you are trying to do: you cannot override a template member function in C++.
So, my suggestion would be to have SetOfCells
be a template class and have a cell<T>**
member.
template <class T>
class SetOfCells
{
....
T get(int cellIndex)
{
return cellArray[cellIndex]->get();
}
....
private:
cell<T>** cellArray;
};