数据结构——学生管理系统

本文介绍了使用数据结构原创编写的 student 管理系统,虽然可能存在 BUG,但在正常运行下能有效展示其功能。作者自称为代码初学者,欢迎经验丰富的开发者交流指正。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

先做以下说明:
1.代码原创,但是也有BUG,我没有写差错处理,正常运行观测没有问题;
2.本人并不是大佬,只是代码小学僧而已,各位大佬留情。

#include <iostream>
using namespace std;
#include <stdlib.h>
#include <stdio.h>
#define MAX 100
typedef struct {
    char name[20];
    char id[10];
    int age;
    char address[20];
    char tel[15];
}PersonInfo;
typedef struct Node {
    PersonInfo person[MAX];
    char classid[10];
    int count;
    struct Node * next;
}ClassInfo;

ClassInfo * CreateListR(FILE *fp);//最开始的录入学生信息
void Demand(ClassInfo * L,string cla, string s);//查找学生信息
void Delect(ClassInfo *L, string id,string cla, FILE * fp);//删除学生信息
void DisList(ClassInfo * L);//输出链表中的数据
void Updata(ClassInfo *L, FILE *fp);//更新文件中的信息
void Amend(ClassInfo *L, string cla, string id);//修改学生信息
void BubbleSort(ClassInfo *L,string cla);//对班级中的学生信息进行排序
void Addition(ClassInfo **L, string cla);//添加学生信息

void  FilePut(FILE * fp) {      //负责输入基本说明和给文件中的数据加上属性名
    fputs("学号\t", fp);
    fputs("姓名\t", fp);
    fputs("年龄\t", fp);
    fputs("地址\t", fp);
    fputs("电话\t", fp);
    fputs("班级\t", fp);
    cout << "====================================================" << endl;
    cout << "                  学生管理系统                      " << endl;
    cout << "====================================================" << endl;
    cout << "使用说明:" << endl;
    cout << "1:录入学生信息和班级信息" << endl;
    cout << "2:查询学生信息(仅支持学号查询)" << endl;
    cout << "3:删除学生信息(仅支持根据学号删除)" << endl;
    cout << "4:修改学生信息" << endl;
    cout << "5:将学生信息按学号排序" << endl;
    cout << "6:增加学生信息" << endl;
    cout << "7:查看已经录入的学生信息" << endl;
    cout << "temp=0则结束输入,反之继续输入" << endl;
}

void Switch(ClassInfo *stu, FILE * fp) {       
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值