I have code similar to the following in the header file:
template<class A>
class List {
private:
QVector<A> _list;
};
where QVector is the standard QT container.
When I try to make a variable of type List as a member variable in another header file, for example:
class Model {
private:
List<int *> the_list;
};
I get the following error:
In instantiation of 'List<int *>':
instantiated from here
error: 'List<A>::_list' has incomplete type
Basically, I want a template template that uses an internal QVector to store data items.
I assume my syntax is not working a bit, so any help would be appreciated.
source
share