C++简单教职工管理系统
梦是突然醒的,就像泡沫一样越吹越大,最后破灭消失。无数时刻感觉自己吊在悬崖边上,抓着最后一根救命稻草,当然可以松开紧握的拉出血痕的双手,但是就这样草草收场,我不甘心。
无数焦虑失眠的夜晚,凌晨三四点的路灯,一把脱落的头发,往死里奔跑时喉咙散发出的血腥味,试着努力发现光亮,追寻光照的方向,对生而破碎的梦缝缝补补,渐渐清晰。
没关系,失去了太多,反而没什么害怕失去的了,破釜沉舟。
#include<iostream>
#include<fstream>
#include<string>
#include<windows.h>
#include<stdlib.h>
#include<iomanip>
using namespace std;
void zhucaidan();
class Employee//职员
{
public:
string number,name,job,gender;
string ch1;
int age;
double salary,temp; //temp存储工作时间,销售额等临时信息
Employee()
{
number="000";
name="iii";
job="000";
gender="0";
ch1="0";
age=0;
salary=0;
temp=0;
}
};
class Sale:public Employee
{
public:
Sale *next;
};
class Manager:public Employee
{
public:
Manager *next;
};
class Salemanager:public Employee
{
public:
Salemanager *next;
};
class Technology:public Employee
{
public:
Technology *next;
};
class operate
{
public:
Sale *head1;
Manager *head2;
Salemanager *head3;
Technology *head4;
operate(){
head1=NULL;
head2=NULL;
head3=NULL;
head4=NULL;
}
template<typename TY>
void input1(TY *y);
void input2();
void output1();//输出
template <typename T>
void output2(T *s);
void statistic();
template <typename B>
void swap(B *r);
void infile1();//备份
template<typename TY>
void infile2(TY *s);
void salarycal();//销售经理工资的计算
};
template<typename TY>
void operate::input1(TY *y)//基本信息输入
{
TY *tem;
tem=y;
cout<<"请输入职工号:"<<endl;
cin>>tem->number;
cout<<"请输入姓名:"<<endl;
cin>>tem->name;
cout<<"请输入性别:"<<endl;
cin>>tem->gender;
cout<<"请输入岗位:"<<endl;
cin>>tem->job;
cout<<"请输入年龄:"<<endl;
cin>>tem->age;
}
void operate::input2()//人员的判断和信息输入
{
int a=1;
while(a)
{
system("cls");
cout<<"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
cout<<"| |"<<endl;
cout<<"| 1.技术员 2.销售员 3.经理 4.销售经理 0.主菜单 |"<<endl;
cout<<"| |"<<endl;
cout<<"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"<<endl;
cout<<"请选择要录入哪个岗位的信息: ";
cin>>a;
switch(a)
{
case 1:{
system("cls");
cout<<"------------------------------------------------------"<<endl;
cout<<" *****技术员信息管理*****"<<endl;
cout<<"------------------------------------------------------"<<endl;
cout<<"请问要输入多少位技术员的信息 :"<<endl;
cout<<"------------------------------------------------------"<<endl;
int num;
cin>>num;
if(num==1)
{
system("cls");
Technology *p;
p=new Technology;
head4=p;
p->next=NULL;
cout<<"请输入第一位技术员的信息:"<<endl;
input1<Technology>(p);
cout<<"请输入工作时长:"<<endl;
cin>>p->temp;
p->salary=p->temp*100;
p->ch1="tt";
system("cls");
}
if(num>1)
{
system("cls");
Technology *p,*q;
p=new Technology;
head4=p;
p->next=NULL;
q=p;
cout<<