c++写入文件,没有出现文本文档这是为什么呀?

#include"workerManager.h"
workerManager::workerManager()
{
//文件不存在
ifstream ifs;
ifs.open(FILENAME,ios::in);
if (!ifs.is_open())
{
cout << "文件不存在!" << endl;
//初始化属性
this->m_EmpNum = 0;
//初始化记录为空
this->m_EmpArray = NULL;
//初始化数组指着为空
this->m_FirleIsEmpty = true;



    //初始化文件是否为空
    ifs.close();
    return;
}
//初始化人数
this->m_EmpNum = 0;
this->m_EmpArray = NULL;

}
void workerManager::showmenu()
{

cout << "************欢迎使用职工管理系统*************" << endl;
cout << "************(1)添加职工信息****************" << endl;
cout << "************(2)显示职工信息****************" << endl;
cout << "************(3)删除职工信息****************" << endl;
cout << "************(4)修改职工信息****************" << endl;
cout << "************(5)查找职工信息****************" << endl;
cout << "************(6)按照编号排序****************" << endl;
cout << "************(7)清空所有文档****************" << endl;
cout << "************(0)退出管理程序****************" << endl;
cout << "*********************************************" << endl;
cout << endl;

}
void workerManager::Exitsystem()
{
cout << "欢迎下次使用" << endl;
system("pause");
exit(0);

}
void workerManager::Add_Emp()
{
cout << "请输入添加职工的数量:" << endl;
int addnum = 0;//保存用户的输入数量
cin >> addnum;
if (addnum > 0)
{
//具体添加
//计算添加新空间大小
int newsize = this->m_EmpNum + addnum;//新空间大小=原记录人数+新增人数
//开辟新空间
worker**newspace= new worker * [newsize];
//将原来空间下的内容拷贝到新空间里
if (this->m_EmpArray != NULL)
{
for (int i = 0; i < this->m_EmpNum; i++)
{
newspace[i] = this->m_EmpArray[i];

        }
    }
    //批量添加新数据;
    for (int i = 0; i < addnum; i++)
    {
        int id;
        string name;
        int dselect;
        cout << "请输入第" << i + 1 << "个员工编号:" << endl;
        cin >> id;
        cout << "请输入第" << i + 1 << "个员工姓名" << endl;
        cin >> name;
        cout << "请选择职工岗位" << endl;
        cout << "1,普通职工" << endl;
        cout << "2,经理" << endl;
        cout << "3,总裁" << endl;
        cin >> dselect;
        worker *worker= NULL;
        switch (dselect)
        {
        case 1:
            worker = new Empoloyee(
#define FILENAME "D:\\data.txt"