高校人事管理系统C++代码_第1页
高校人事管理系统C++代码_第2页
高校人事管理系统C++代码_第3页
高校人事管理系统C++代码_第4页
高校人事管理系统C++代码_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

#include#include#includepowered by 25175.net#includeusing namespace std;class employeeprotected:int number;char name20;char sex6;char workplace20;char place20;char nation6;char birth20;char party10;char id20;float score5;public:Employee *nest;Employee()Employee()char* getname() return name; int getnumber() return number; double getscore(int i) return scorei;float get() return(score0+ score1+ score2+ score3+ score4);void input() int e=1; cout“ttt按提示输入:”endl; coutworkplace; do coutsex; if(strcmp(sex,“man”)=0 | strcmp(sex,“woman”)=0) coutplace; coutnation; coutbirth; coutparty; coutid; coutscore0; coutscore1; coutscore2; coutscore3; coutscore4; e=0; else cout“ttt无此类型性别!重新输入!”numbernamesexplacenationbirthpartyidscore0 score1 score2 score3 score4; is.get(); void output() cout“职工基本信息如下:”endl; cout“工号:”number “ 姓名:”name “ 性别:”sex“ 籍贯:”place“ 民族:”nation“ 工作单位:”workplace“ 生日:”birth“ 政治面貌:”partyendl“身份证号:”id“ 工作时间:”score0“ 缺勤次数:” score1“ 业绩总评成绩:”score2“ 调动工作次数:”score3“ 目前工资:”score4endl; void output(ofstream & os) ossetw(6)number setw(15)name setw(6)sex setw(20)place setw(6)nation setw(20)workplace setw(20)birth setw(20)party setw(20)id setw(6)score0 setw(6) score1 setw(6) score2 setw(6) score3 setw(6) score4 next=NULL;key=0; company()delete head; void input(); void mend(); void del(); int find(Employee*p,int num,char *pn=“”) ; void found(); void show(); void save(); void begin(); void clear; char mainmenu(); int getkey()return key; void setkey(int k)(key=k;)private: Employee *head; int key;Void company:input() Employee *p,*p2=NULL; P=head; int n; while(p-next) p=p-next; while(n) p2=new Employee; p2-input(); p-next=p2; p2-next=NULL; p=p-next; company:setkey(1); coutn; int company:find(Employee *p1,int num,char *pn) Employee *p; p=head; while(p-next) (*p1)=p; if(p-next)-getnumber()=num!strcmp(p-next)-getname(),pn) return 1; p=p-next; return 0;void company:found() Employee *p; int num=-1,n=9; char name20=”; do coutn; while(n2); if(n=1) coutnum; if(n=2) coutname; if(!find(&p,num,name) cout”tt找不到你要查找的内容!”next)-output();Void company:del() Employee *p,*p2; int num; coutnum; if(!find(&p,num,”) cout”tt找不到你要删除的内容!”next)-output(); p2=p-next; p-next=p2-next; delete p2; company:setkey(1);void company:show() Employee:*p; p=head; while(p-next) (p-next)-output(); p=p-next; void company:mend() Employee *p; int num=-1,n; char name20=”; do coutn; while(n2); if(n=1) coutnum; if(n=2) coutnum; if(!find(&p,num,name) cout”tt找不到你要修改的内容!”next)-output(); (p-next)-input(); Company:setkey(1);void company:save() Employee *p; p=head; ofstream os(“Employee.txt”,ios:out); if(company:getkey()=1) while(p-next) (p-next)-output(os); p=p-next; cout”ttt文件已保存!”num; is.seekg(t); if(numinput(is); p2-next=p2; p2-next=NULL; p=p-next; void company:clear() Employee *p,*p2; P=head-next; while(p) p2=p; p=p-next; delete p2; char company:mainmenu()char n6;cout”nn 欢迎进入内蒙古医院人事管理系统”endlendl” *”endl” *”endl” * 1: 录入职工信息 *”endl” * 2: 显示职工信息 *”endl” * 3: 查找职工信息 *”endl” * 4: 删除职工信息 *”endl” * 5: 修改职工信息 *”endl” * 6: 保存职工信息 *”endl” * 0: 退出系统 *”endl” *”endl” *”endln;return n0;void main() company pp;int k=1;char n;pp.begin();while(k=1)n=pp.mainmenu();switch(n) case1:pp.input();break;case2:pp.show()

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论