All pastes #470902 Raw Edit

pelucha

public text v1 · immutable
·published 2007-05-04 16:14 UTC
rendered paste body
template<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();

};