Advertisement
kabel2087

Untitled

Nov 27th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. STRUKTURA *aktualizacia(STRUKTURA *zoznam)
  2. {
  3. STRUKTURA *pom,*prepis,*start;
  4. char *spz;
  5.  
  6. start=zoznam;
  7.  
  8. scanf("%s",&spz);
  9.  
  10. prepis = (STRUKTURA *) malloc(sizeof(STRUKTURA));
  11. getc(stdin);
  12. gets(prepis->kategoria);
  13. gets(prepis->SPZ);
  14. gets(prepis->znacka);
  15. gets(prepis->predajca);
  16. scanf("%d",&(prepis->cena));
  17. scanf("%d",&(prepis->rok_vyroby));
  18.  
  19. getc(stdin);
  20. gets(prepis->stav_vozidla);
  21. while (pom!=NULL)
  22. {
  23. if(strcmp(*pom->SPZ, spz) != NULL)
  24. {
  25. strcpy(pom->kategoria, prepis->kategoria);
  26. pom = pom->next;
  27. return;
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement