基本信息
源码名称:员工信息管理系统
源码大小:0.60M
文件格式:.zip
开发语言:C/C++
更新时间:2020-12-26
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 2 元 
   源码介绍
员工信息管理

#include "Chairman.h"
void Chairman::input()
{cout << "请输入主任工程师的信息:" << endl << "职务、部门、专业、职称、编号、姓名、年龄:";
cin >> this->zhiwu >> this->department >> this->major
>>this->zhicheng>> this->number >> this->name >> this->age;
Write(*this);}//提示用户输入信息
void Chairman::write(fstream &m)
{m.open("Chairman.txt", ios::app);
m << "\t" << zhiwu << "\t" << department << "\t" << major << "\t" << zhicheng
<< "\t" << number << "\t" << name << "\t" << age<<endl;
m.close();}//写入文件
void Chairman::read(fstream &n)
{n.open("Chairman.txt", ios::in);
if (!n.is_open())
{cout << "文件打开失败" << endl;
system("pause");
return;}
cout << "主任工程师:"<< "\t职务\t"<<"部门\t"<<"专业\t"
<<"职称\t"<<"编号\t"<<"姓名\t"<<"年龄" << endl;
n >> this->zhicheng >> this->department >> this->major >>
this->zhicheng >> this->number >> this->name >> this->age;
while (!n.eof())
{cout << "\t\t" << this->zhicheng << "\t" << this->department << "\t"
<< this->major << "\t" << this->zhicheng << "\t"
<< this->number << "\t" << this->name << "\t" << this->age << endl;
n >> this->zhicheng >> this->department >> this->major >> this->zhicheng >> this->number >> this->name >> this->age;}
n.close();}//读取文件
void Chairman::display()
{Read(*this);}//输出文件的内容