Posted By

ppbeto94 on 09/21/13


Tagged


Versions (?)

apgregar al final de listas encadenadas


 / Published in: C++
 

Para agregar al final de listas encadenadas.

  1. template <class T>
  2. void Lista<T>::AgregarAlFinal(T dato)
  3. {
  4. Nodo<T> *aux = new Nodo<T> ();
  5. Nodo<T> *temp = new Nodo<T> (dato);
  6. aux = inicio;
  7. while (aux->sig != NULL)
  8. {
  9. aux = aux->sig;
  10. }
  11. aux->sig = temp;
  12.  
  13.  
  14. }

Report this snippet  

You need to login to post a comment.