a53

FAdaugareInceputLLDI

a53
Apr 20th, 2021 (edited)
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. void AdaugareInceput(nod*&prim, nod*&ultim, int x)
  2. {
  3. if(prim==NULL)
  4. {
  5. prim=new nod;
  6. prim->info=x;
  7. prim->ant=NULL;
  8. prim->urm=NULL;
  9. ultim=prim;
  10. }
  11. else
  12. {
  13. nod*p=new nod;
  14. p->info=x;
  15. p->ant=NULL;
  16. p->urm= prim;
  17. prim->ant=p;
  18. prim=p;
  19. }
  20. }
Add Comment
Please, Sign In to add comment