#include "stdio.h"
#include "stdlib.h"
struct awp
{char name;
int a,b;
struct awp *next;
}*creat();
void main()
{struct awp *head,*pp;
head=creat();
for (pp=head;pp!=NULL;pp=pp->next)
printf("%c%d%d",pp->name,pp->a,pp->b);
}
struct awp *creat()
{struct awp *head=NULL,*tail=NULL,*p;
char name[80];
int a,b,size;
size=sizeof(struct awp);
scanf("%c%d%d",name,&a,&b);
while (a!=0){
p=(struct awp *)malloc(size);
p->a=a;p->b=b;p->name=name[7],p->next=NULL;
if (head==NULL)
head=p;
else
tail->next=p;
tail=p;
scanf("%c%d%d",name,&a,&b);}
return head;
}
我想要把name改成字符串输入和输出字符串,要怎么改?