The structure for the list is set. How to delete a user-defined item in this list? Code does not work correctly - deletes all list items.
delete_3(Person *lst){ int num = 0; printf("Какой элемент удалять?\n"); scanf("%d",&num); Person *p; p = lst; do { p->name[0] = '\0'; p->job[0] = '\0'; p->home[0] = '\0'; print_2(lst); p = p->ptr; } while (p != NULL); }
num
, if further this variable is not used in any way? - Mikhail Murugov