void sls_store(struct address *i,struct address **star,struct address **last) { struct address *old,*p; p=*start; if(!*last) { i->next=NULL; *last=i; *start=i; return; } old=NULL; while(p) { if(strcmp(p->name,i->name)<0) { old=p; p=p->next; } else{ if(old){ old->next=i; i->next=p; return; } i->next=p; *start=i; return; } } (*last)->next=i; i->next=NULL; *last=i; }
sry but i cant recoznize much here.. looks like a modified form of the standard function to add a new member to a previously existing linnked-list.. btw what is "struct address **star" ?? never seen such thing! is it a pointer to a pointer?
i too confused a lot at that **star....... donno exactly.... that's wat is the program... it's ok..thanks ...
one thing..the variable star is never used here..anyway i suggest try without two **..all programs i did were done with only single *
hmn....ok
Well, I see that there was a Best Response given so I assume the question was answered but what was the questions? Quarkine, the ** is a pointer to a pointer.
is ** really necessary for such a basic function?
@MathDoodler ??
No
thought so..
Join our real-time social learning platform and learn together with your friends!