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

📄 g_dept.h

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

⌨️ 快捷键说明

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