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>

 

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
猜你喜欢
  • 2022-12-23
  • 2021-12-10
  • 2021-07-19
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案