> but still its complicated for me
you need to be more descriptive of the problem.
try with your dog first
* (I'm serious).
1 2
|
snode * head = *headRef;
head = sheader;
|
explain your reasoning, please.
First you set `head' to `headRef', then you just overwrite that value. In the end, you don't even use the parameter.
Same thing in `merge()', lines 25,26
1 2
|
for(a=sheader;a!=NULL;a=a->slink){
for(b=a->slink;b!=NULL;b=b->slink){
|
`a' and `b' were pointing to the list that you were working on, but you simply decided to throw away them.
Also, `sheader' is a global variable, ¿why?
* cats don't pay attention.