Advertisement
Guest User

xd

a guest
Apr 23rd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1.     while (fgets(line,500,xd)){
  2.         token = strtok(line,","); //Reads the line til if finds the first comma. Getting the integer "rut"
  3.         if (token != NULL && atoi(token) == *p->rut){ //Here, it compares to a struct named p, pointing to its value "rut"
  4.             fprintf(xd,"%s,",r->code); //Writes at the end of the line read by fgets, but this does not prints the
  5.                                       // r->code into the file. Just if the line is the last one.
  6.         }
  7.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement