C++对文件的操作

1. 文件写入: #include <fstream> using namespace std; void main() { ofstream out; //创建一个文件输出流 out.open("C:\\123.txt"); //输出到文件 out << "锄禾日当午,汗滴禾下土。" << endl; out.close(); syste
相关文章
相关标签/搜索