Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void psn(lst *head, FILE *fp)
- {
- if (head == NULL)
- {
- printf("The list is empty");
- return;
- }
- int err = 0;
- while (head != NULL)
- {
- if (err = fprintf(fp, "%s\n", head->data.name) != 1)
- printf("Greshka pri zapis\n");
- if (err = fprintf(fp, "%d\n", head->data.num) != 1)
- printf("Greshka pri zapis\n");
- if (err = fprintf(fp, "%f\n", head->data.cht) != 1)
- printf("Greshka pri zapis\n");
- head = head->next;
- }
- if (fp)
- fclose(fp);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement