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

📄 c_dept.h

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

⌨️ 快捷键说明

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