- 3
- 0
- 约4.71千字
- 约 19页
- 2017-10-07 发布于河南
- 举报
最终版cpp(Final version CPP)
最终版cpp(Final version CPP)
#包含iostream
#包括字符串
#包括文件
#包括iomanip
使用名称空间;
类节点
{
公共:
节点*左;
节点*右侧;
node()
{
左= 0,右= 0;
}
添加(节点**)
{
右=右;
左=这个;
如果(右)!= NULL)右;
右= n;
}
del1()节点
{
如果(左)!= 0)左=右=右;
如果(右)!= 0)右左=左;
返回0;
}
无效show()
{
cout “姓名:“ SEtW商店(8)名 endl;
cout “班级:“ SEtW商店(8)年级 endl;
cout “性别:“ SEtW商店(8) endl 性别;
cout “院系:“ SEtW商店(8) endl院子;
cout “成绩如下:“ endl;
cout “C++:“ SEtW商店(8) CPP endl;
cout “英语:“ SEtW商店(8)英语 endl;
cout “数学:“ SEtW商店(8)数学 endl;
cout endl;
}
字符串名称;
串级;
字符串的性别;
串场;
字符串的CPP;
串英文;
字符串的数学;
};
delete1节点(节点与头,字符串名称)
{
对于(节点*我= head.right;我!= 0;
{
如果(name = name)
{
还我;
}
}
返回0;
}
初始化(节点和头,字符串名,字符串等级,字符串属性,字符串字段,字符串CPP,字符串英语,字符串数学)
{
节点*;
新节点;
name = name;
等级=年级;
性=性;
院子=院子;
n = CPP = CPP;
英语=英语;
数学=数学;
头。添加(n);
}
空del(节点**)
{
如果(n)!= 0)n→del1();
删除N;
}
无效输入(节点和头)
{
/系统(“CLS”);
节点*;
新节点;
cout “输入姓名、班级、性别、院系、成绩:“ endl;
cout “姓名:”;
名称;
cout “班级:”;
年级;
cout “性别:”;
性别;
cout “院系:”;
庭院庭院;
cout “成绩:“ endl;
cout “CPP:”;
栏位;
cout “英语:”;
英语;
cout “数学:”;
数学;
cout “___________________输入完成__” endl;
头。添加(n);
}
空显示(节点和头部)
{
对于(节点*我= head.right;我!= 0;
{
我- show();
}
}
空白搜索(节点和头,字符串名称)
{
对于(节点*我= head.right;我!= 0;
{
如果(name = name)
{
如果(i)!= 0)
{
我- show();
}
}
}
}
无效保存(节点和头)
{
ofstream文件(“1 .txt”);
文件“姓名“”\“”班级“”\“”性别“”\“”院系”“\t”“CPP”“\t”“英语“”没有“”数学”“\n” endl;
对于(节点*我= head.right;我!= 0;
{
文件名 “”;“性”;
}
}
无效menu1(节点与头)
{
布尔B =假;
字符串;
/节点头;
cout “学生信息管理” endl endl;
cout “操作指令如下” endl;
cout “***********************************” endl;
cout “添加信息储存请输1” endl;
court * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * endl;
court 查看所有信息请输入 2 endl;
court * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * endl;
court 删除信息请输入 3 endl;
court * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * endl;
court 查询信息请输入 4 endl;
court * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * endl;
court 对信息进行存盘请输入 5 endl;
court * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
您可能关注的文档
- 数学考题(Math exam).doc
- 数学解题教学中变式的意义和发展(The significance and development of variation in mathematical problem solving teaching).doc
- 数学解题中转化思维的六种策略(Six strategies for transforming thinking in mathematical problem solving).doc
- 数学趣味故事(Mathematical interest stories).doc
- 数学领域中的主要奖项(Major awards in the field of Mathematics).doc
- 数形结合的教学与学习滴点(Teaching and learning drop points in combination of numbers and shapes).doc
- 数据业务全线攻略 为校园生活添色彩(Data services across the board, add color to campus life).doc
- 数据交换服务(Data exchange service).doc
- 数据库库优化(Database library optimization).doc
- 数学科学学会群聊天2011-08-31(Group of Mathematical Sciences chat 2011-08-31).doc
原创力文档

文档评论(0)