链表?????
#define NULL 0struct student
{
long num;
char name[20];
float score[3];
struct student *next;
};
void main()
{
struct student *p,*head;
struct student a,b,c;
a.num=10036;a.name="xf";
b.num=10037;b.name="jbm";
c.num=10038;c.name="zz";
head=&a;
a.next=&b;
b.next=&c;
c.next=NULL;
p=head;
do
{
printf("%-5d%-6s",p->num,p->name);
p=p->next;
}
while(p!=NULL);
}
这样做也错????