1 / 10
文档名称:

C 程序设计学生信息管理源码.doc

格式:doc   大小:308KB   页数:10页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

C 程序设计学生信息管理源码.doc

上传人:aluyuw1 2018/8/13 文件大小:308 KB

下载得到文件列表

C 程序设计学生信息管理源码.doc

相关文档

文档介绍

文档介绍:C++课程设计学生信息管理源码, VC环境测试通过。
.h文件
#include <string>
using namespace std;
class info //信息类
{
public:
string NAME;
string GRADE;
string SEX;
string YARD;
string CPP;
string ENGLISH;
string MATH;
};
class node:virtual public info //结点类(虚基类)
{
public:
node* left;
node* right;

node(); //构造函数

void add(node* n); //添加信息
node* del1(); //删除信息

void show(); //显示信息
};
//删除实现方式
node* delete1(node& head, string name);
//添加信息方式将数据赋值给数据成员
void init(node &head,string name,string grade,string sex,string yard,string cpp,string english,string math);
//删除函数
void del(node* n);
//信息录入
void enter(node& head);
//实现显示
void display(node& head);
//实现查找
void search(node& head, string name);
//信息保存
void save(node &head);
//菜单1 管理员菜单
void menu1(node& head);
//菜单2 学生菜单
void menu2(node& head);
.cpp文件
#include <iostream>
#include <string>
#include <fstream>
#include <iomanip>
#include ""
#include ""
using namespace std;
node::node() //构造函数初始化
{
left=0,right=0;
}

void node::add(node* n) //实现信息添加
{

n->right=right;
n->left=this;

if(right!=NULL)right->left=n;
right=n;
}

node* node::del1() //实现删除
{

if(left!=0)left->right=right;
if(right!=0)right->left=left;
return 0;
}

void node::show() //信息显示方式
{
cout<<"姓名:" <<setw(8)<<NAME<<endl;
cout<<"班级:" <<setw(8)<<GRADE<<endl;
cout<<