Advertisement
Guest User

telefonpix

a guest
Mar 30th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. struct nod{
  4. int inf;
  5. nod *adr;
  6. };
  7. void Creare(int a, nod *c){
  8. nod *c=new nod;
  9. c->inf=a;
  10. c->adr=NULL;
  11. p=c;
  12. }
  13. void Inserare(int a, nod *&p){
  14. nod *c;
  15. c=new nod;
  16. c->adr=p->adr;
  17. c->inf=a;
  18. p->adr=c;
  19. }
  20. void Lista(nod *&q, int s[], int n){
  21. Creare(q.s[1]);
  22. for(i=1;i<=n;i++) Inserare(q,s[i]);
  23. }
  24. void Sterge (nod &*p){
  25. nod c;
  26. c= new nod;
  27. c=p->adr;
  28. p->adr=c->adr;
  29. delete c;
  30. }
  31. int main()
  32. {
  33. int a;
  34. nod *c,p;
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement