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; };
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?
lista