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

📄 r_dept.h

📁 C++编写的学生信息管理系统
💻 H
字号:
//文件名:R_dept.h
//功能:人事部
#ifndef R_dept_H
#define R_dept_H
#include<iostream>
#include"Name.h"
#include"AutoInt.h"
#include"Date.h"
#include"Query.h"
#include"Stat.h"
using namespace std;
class R_dept:public AutoInt,public Name,public Date,public Query,public Stat
{
public:
	R_dept()
	{
		dept='R';
		ifstream fin_R;//首先判断存储本部门人数的文件是否存在,存在读如人数,不存在初始化为0
		fin_R.open("file6.dat",ios::in);
		if(!fin_R)
			num=0;
		else
		{
		    fin_R>>num;
		    fin_R.close();
		}
	}
	void R_display()
	{
	cout<<"人事部总人数为:"<<num;
	}
	void R_save()
	{
		ofstream fout;
		fout.open("file6.dat",ios::binary);//文件file6用于存储人事部总人数
        fout<<num;
		fout.close();
	}
};
#endif

⌨️ 快捷键说明

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