oops, I seem to have forgotten one line of code. it goes just before
Print(&head1); and it states
*head = head1;
this is what I get after running the program, so I think it's ok.
...
Type: Posts; User: budala
oops, I seem to have forgotten one line of code. it goes just before
Print(&head1); and it states
*head = head1;
this is what I get after running the program, so I think it's ok.
...
thanks roaan for pointing the neverending loop to me. I also changed some other things which I colored and now it works beautifully :cool:
/* SORTED INPUT*/
void SortedInsert(person **head,...
I don't think so. Because the way I see it, if the original list is empty (head == NULL) then there is nothing to sort, but if not the sorted list should start empty and then add nodes as they come...
Ok, a new idea. Using the tested SortedInsert() to sort an existing list. My idea is that I start from the first node in the existing list and insert it using SortedInsert() into a new list. But it...
Unbelievable!!! Thanks man! (or woman) :-)
ok, a new problem. inserting a node in a sorted list. I just give the struct and the sortedinput function, as everything works flawlessly.
the problem is in the special case when new is younger...