求一个用C++6.0写的学生管理

来源:百度知道 编辑:UC知道 时间:2024/05/30 12:40:28
要求写一个学生类(学号,姓名,年龄)和一个链表类(能添加,删除,历遍链表)对其进行操作,还能对学生的属性进行修改。

#ifndef H_STUDENT_HH
#define H_STUDENT_HH

#include "stdio.h"
#include "string.h"
#include "malloc.h"

#define LEN sizeof(struct message_student) /*一个结构体数组元素的长度*/
#define numsubs 5 /*学科数目*/
typedef struct message_student /*结构体定义*/
{
char number[6];
char name[20];
char sex[4];
float subject[numsubs];
float score;
float average;
int index;
}student;

extern int numstus; /*学生数目*/
extern student *pointer; /*指向结构体数组*/
extern int lens;

int menu_select(); /*函数声明*/
int openfile(student stu[]);
int findrecord(student stud[]);
int writetotext(student stud[]);
void welcome();
void display1();
void showtable();
void sort(student stu[]);
void deleterecord(student stu[],int i);
void addrecord(student stud[]);
void display(student stud[],int n1,int n2);
void amendr