满意答案
梦幻初出茅庐的
2018.11.27
采纳率:59% 等级:9
已帮助:365人
1、更多交流可参考我空间主页有关文章。
2、#include
#include
#include
/*定义结构体*/
struct student
{
int num;
float score;
struct student *next;
};
/*创建一个只有头结点的空链表*/
struct student *create_head()
{
struct student *head;
head=(struct student*)malloc(sizeof (struct student) );
if(head==NULL) //小心别漏这个
{
printf("申请头结点失败!\n");
return NULL;
<