#include <fstream>
#include <iostream>
int main() {
std::ofstream outfile;
// 以写模式打开文件
outfile.open("afile.dat", std::ios::app);
outfile << "hello world" << std::endl;
outfile.close();
}
C++ 文件读写
最新推荐文章于 2024-07-03 20:18:43 发布