链表的输入问题
能有高手来说一下链表是怎么输入数据的吗.struct student
{
long num;
char name[20];
char sex;
int age;
struct student *next;
};
...
....
p1=(struct student *)malloc(LEN);
scanf("%ld,%s,%c,%d",&p1->num,p1->name,&p1->sex,&p1->age);
这个输入语句正确吗??
2007-10-29 21:22
2007-10-29 21:35
2007-10-29 21:42