文章目录
开发环境
- 开发环境
- 头文件选择
- 常量定义
- 结构体定义
- 函数API定义
- 完整代码
C版本:C99 IDE:CLion C编译器:MinGW 数据结构:无序单链表
头文件选择#include #include #include
常量定义课程容量:#define MAXSIZE 100 课程门数:#define COURSENUM 6
结构体定义typedef struct student { int num; // 学号 char name[20]; // 姓名 float score[COURSENUM]; // 各门课的成绩 float ave; // 平均分 } StuType;
typedef struct Students { StuType *elem; // 学生数组空间起始地址 int length; // 学生实际个数 } Students;
函