I made it
The problem was with one pointer referring to NULL value.
Here is the corrected version:
Code:
struct pnode *bform(struct pnode *coeff, int a)
{
struct pnode *p=coeff;
struct pnode *temp1=p;
struct pnode *proba=NULL;
double b=temp1->coeff;
proba=insert(proba,1,b);
while(temp1->link!=NULL)
{
temp1->link->coeff=a*(temp1->coeff)+(temp1->link->coeff);
proba=insert(proba,1,temp1->link->coeff);
temp1=temp1->link;
}
return(proba);
}
So, if anyone needs this prog for computing Horne's scheme, I ll translate it and upload.
It's not a big deal, but I couldn't find anyone did this using linked lists.
It's way easier with arrays.