#include <iostream>
#include <fstream>
using namespace std;
ofstream fout("e:\\a.txt");
fout << "hello\n";
fout.flush();
fout.close();//切记关闭!!!!
fstream 写文件
最新推荐文章于 2024-01-23 11:55:12 发布
#include <iostream>
#include <fstream>
using namespace std;
ofstream fout("e:\\a.txt");
fout << "hello\n";
fout.flush();
fout.close();//切记关闭!!!!