Im getting a segmentation fault when trying to display an element of type (int)
template <class T>
void Lista<T>::imprimir()
{
NodoL *ptr = new NodoL;
ptr->sig = pri->sig;
cout << *ptr->sig->elem; //THIS DISPLAYS CORRECTLY
cout << *ptr->sig->sig->elem; //SEGMENTATION FAULT
}
Are you sure sig is not NULL ?