初学数据结构,想用链表实现多项式创建和其他操作,可以创建并返回头指针,但在while循环时总会报错segmentation fault,
void polyprint(struct poly *H){
struct poly *p=NULL;
poly_order(H);
p=(struct poly *)malloc(sizeof(struct poly));
p=H->next;
printf("%f\n",p->next->next->c);
if(p->next){
while(p->next!=NULL) {
printf("%f*x^%d+",p->c,p->e);
if(p->next)p=p->next;
}
}
}