bool CMaked::WriteFileMake(CString filePath, const char *isChange)
{
ofstream file;
//filePath为该txt文档的全路径
file.open(filePath, ios::out);//以写的方式打开,没有会创建
if (file.is_open())
{
file << isChange << endl;
file.close();
return true;
}
return false;
}

  以上需要包含的头文件:#include <fstream>

05-11 11:21