关于用C语言链表实现多项式乘法的问题,请高手指教

2025-04-05 04:10:27
推荐回答(1个)
回答1:

1 heada和headb传入foundation之前要初始化的:
struct student * heada=0,*headb=0,*headc=0;
2 calculate函数里面的while()循环后怎么能加“;”呢……
把while(p1->next!=NULL);和while(p2->next!=NULL);后面的“;”都去掉。
3 储存乘积的链表最后没有把next指针指向空,所以最后调用out时出错
在printf("the text A information is:\n");这句话前面加上
p3->next=NULL;这句话,就没问题了!