/ Published in: C++
Para agregar al final de listas encadenadas.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
template <class T> void Lista<T>::AgregarAlFinal(T dato) { Nodo<T> *aux = new Nodo<T> (); Nodo<T> *temp = new Nodo<T> (dato); aux = inicio; while (aux->sig != NULL) { aux = aux->sig; } aux->sig = temp; }