Advertisement
Guest User

Untitled

a guest
Apr 25th, 2014
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. //001;Shutter Island;2010;138;Martin Scorsese
  2.  
  3. while (fscanf(fi, "%d;%[^;]%s;%d;%d;%[^;]%s", &(filmid+i)->kood, nimi, &(filmid+i)->aasta, &(filmid+i)->kestvus, res)!= EOF) {
  4.  
  5. filmid = (andmed*)realloc(filmid, (i+1)*sizeof(andmed));
  6.  
  7. (filmid+i)->nimi=(char*)malloc(strlen(nimi));
  8. strcpy((filmid+i)->nimi,nimi);
  9. (filmid+i)->res=(char*)malloc(strlen(res));
  10. strcpy((filmid+i)->res,res);
  11.  
  12.  
  13. i++;
  14.  
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement