Where are the declarations of dnode and the include function? Other than that, quickly looking through the code: if(val1 < val)
would not work, since there is no declaration for it. I am assuming you meant something like if(val1 < p->val)
Also the statement *p->next;
would not do anything. It would simply give the structure pointed to by the structure *p, but would not assign it to anything. p = p->next;
would do that.
serkan sendur commented: very good +3
nmaillet 97 Posting Whiz in Training
Alex_ commented: Good formulas! +1