下载此文档

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


文档分类:IT计算机 | 页数:约10页 举报非法文档有奖
1/10
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/10 下载此文档
文档列表 文档介绍
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<<

C 程序设计学生信息管理源码 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数10
  • 收藏数0 收藏
  • 顶次数0
  • 上传人aluyuw1
  • 文件大小308 KB
  • 时间2018-08-13