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