I would like to write all the integer values in the linked list on an individual line, I have a start but multiple errors and I am not sure where to go from here.
struct ListNode {
int value;
struct ListNode * next;
};
int llist_save(LinkedList * list, char * file_name) {
ListNode *e = list->head;
FILE * fd = (file_name, "w");
while(e != NULL){
fprintf(fd, "%d\n", e->value);
e = e->next;
}
fclose(fd);
}
Aucun commentaire:
Enregistrer un commentaire