2020-8-16更新
单向链表
链表的定义,声明及引用
从尾端添加链表节点
█ 练习
#include <stdio.h>
#include <windows.h>
#include <string.h>
//结点结构体
struct node
{
void * node_date; //结点的数据域,void * 表示指向任何类型的指针
struct node * node_next; //结点的指针域,下一个结点的地址
};
//用户结构体
struct User
{
char name[20]; //用户名
char score; //用户分数
};
//__链表的初始化函数
struct node * Ini_Node(void * _node_date)
{
struct node * head;
head = (struct node * )malloc(sizeof(struct node)); //开辟空间
memset(head,0,sizeof(struct node));
head->node_date