First parametrized class
template<typename T>
class elements
{
protected:
int e,f;
public:
elements(){}
elements(int ee):e(ee){}
const elements& operator=(const elements& other)
{
e = other.e; return *this;
}
};
The base class
template<typename T>
class list
{
protected:
T item;
};
Finally the class in contention
template<typename T>
class row:public list<elements<T> >
{
public:
row(int a)
{
item;
}
};
if the parameter is specified as int, list etc. Then the program runs else I keep getting the error 'item' was not declared in this scope,
I can't seem to get to work and would appreciate if someone could help me understand how it works.
Thanks