pelucha
public text v1 · immutabletemplate<class T>
class Lista :public Nodo<T>
{
public:
Nodo<T> *pHead;
Nodo<T> *pLast;
Lista() : Nodo<T>()
{
pHead=0;pLast=0;
}
void showList()
{
Nodo<T> *tmp=pHead;
for(;tmp=pLast;tmp=tmp->pSig)
{
cout<<tmp->dato<<" "<<endl;
}
}
Nodo<T> getpHead()
{
return *pHead;
}
Nodo<T> getpLast()
{
return *pLast;
}
void setpHead(Nodo<T> *p)
{
pHead=p;
}
void setpLast(Nodo<T> *q)
{
pLast=q;
}
Nodo<T> getsig(Nodo<T> *p,Nodo<T> *q)
{
return p->pSig=q;
}
// virtual ~Lista();
};