The class is not a class template.

I get the error: class is not a class template. Any idea why?

template<class T> class nod{ friend class lista<T>; protected: T info; nod<T> *urm,*prec; }; 
+5
source share
1 answer

lista is not yet known in the code. Therefore, of course, the compiler does not consider this a template. You need to forward the declaration with its template arguments. See Also: How to forward a C ++ template class declaration?

+8
source

All Articles