你觉得有问题吗??
#define null 0#define false 0
typedef int elemtype;
typedef int status;
typedef stuct nodetype{
elemtype data;
struct nodetype *next;
}nodetype, *linktype;
status pushnode(linktype &h,elemtype e)
{linktype &r;
r=(linktype)malloc(sizeof(nodetype));
if(!r)return false;
r->data=e;r->next=h;
h=r;}
main(){
int x,y,z=0;
linktype &p,&q,&s;
for(; ;){
scanf("%d",&x);
if(x!=11)pushnode(&p,x);
else break;}
for(; ;){
scanf("%d",&y);
if(y!=11)pushnode(&q,y);
else break;}
if(p!=null||q!=null||z!=0)
{
s=(linktype)malloc(sizeof(nodetype));
s->data=p->data+q->data+z;
if(s->data>=10){z=(s->data)/10;
s->data=(s->data)%10;}
pushnode(&s,s->data);
p=p->next;q=q->next;
if(p=null)p->data=0;
if(q=null)q->data=0;
}
while(s!=null)
printf("%d",s->data);
s=s->next;
}
printf("/n");
}
我就不知道错在哪里了