Advertisement
ambigus9

Función Elminar

Jul 29th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. void Lsec::eliminarNodo()
  2. {
  3. nodo *aux,*apunt2;
  4. char resp;
  5.  
  6. apunt2=new nodo();
  7. aux=new nodo();
  8. aux=inicial;
  9. cout<<"Entre clave del nodo a eliminar"<<endl;
  10. cin>>apunt2->dato;
  11. while(aux->dato!=apunt2->dato)
  12. {
  13. aux=aux->sig;
  14. }
  15. aux->sig=apunt2->sig;
  16. delete apunt2;
  17. cout<<"Listo!!!"<<endl;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement