⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jsandsy.cpp

📁 高校工资管理系统 Visual C++实现简单的高校工资管理系统
💻 CPP
字号:
#include<fstream.h>
#include"stdlib.h"
#include"jsandsy.h"
#include"string.h"
#include"iostream.h"
struct people_str
{
	int ID;
	char name[8];
	char kind[20];
	double salary;
}jsstruct[30];
jsandsy::jsandsy(){}
jsandsy::~jsandsy(){}
int jsandsy::m=0;
void jsandsy::addpeople()
{
    cout<<"\n编号:";  cin>>jsstruct[m].ID;
    cout<<"姓名:";  cin>>jsstruct[m].name;
	cout<<"上学期工作量:"; cin>>b;
    jsstruct[m].salary=800+650+150+(b-120)*20;
	cout<<"职位:教师兼实验员"; 
	cout<<"\n月工资:"<<jsstruct[m].salary;
	ofstream outfile("worker.txt",ios::in|ios::out,0);
	if(! outfile)
	{
	  cerr<<endl<<"员工信息文件打开错误!"<<endl;
	  abort();
	}
	outfile.seekp(0,ios::end);
	outfile<<jsstruct[m].ID<<" "<<jsstruct[m].name<<" "
	<<jsstruct[m].salary<<" "<<"教师兼实验员"<<jsstruct[m].kind<<endl;
	outfile.close();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -