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

📄 x_dept.h

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

⌨️ 快捷键说明

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