c++学生管理系统(一)

新建student.h

 1 #include<iostream>
 2 #include<string>
 3 
 4 using namespace std;
 5 
 6 struct Student {
 7     string no;
 8     string name;
 9     string sex;
10     int age;
11     int score;
12     Student *next;
13 
14 };
15 
16 void displayStudent(Student *stu_head);
17 Student* searchStudent(Student *stu_head);
18 Student* addStudent(Student *stu_head);
19 void modStudent(Student *stu_head);
20 Student* delStudentByNo(Student *stu_head, string sno);
学生信息是struct结构,由单向链表存储信息,对数据的增删改查都是由头部节点开始遍历操作。
next是指向Student的指针,是节点间关联的根本。

函数介绍:
displayStudent //打印学生信息
searchStudent //搜索学生信息
addStudent //添加学生信息
modStudent //修改学生信息
delStudentByNo //删除学生信息
原文地址:https://www.cnblogs.com/zhengze/p/14347967.html