用字符来就不行了么?什么问题呢?
#include <stdio.h>
#include <stdlib.h>
struct student {
char name;
char gender;
struct student *next
};
int main()
{
struct student a,b,c, *head;
a.name="xiong";
a.gender="boy";
b.name="ye";
b.gender="boy";
c.name="du";
c.gender="girl";
head=&a;
a.next=&b;
b.next=&c;
c.next=NULL;
struct student *p;
p=head;
while(p!=NULL)
{
printf("%s\n%s\n",p->name,p->gender);
p=p->next;
}
printf("pause");
printf("Hello world!\n");
return 0;
}