首先,在C++中对文件进行操作,要包含头文件
#include <fstream>
using namespace std;
然后是打开文件
ofstream outfile("data.txt",ios::trunc);//data.txt里面的内容会被清空
ofstream outfile("data.txt",ios
首先,在C++中对文件进行操作,要包含头文件
#include <fstream>
using namespace std;
然后是打开文件
ofstream outfile("data.txt",ios::trunc);//data.txt里面的内容会被清空
ofstream outfile("data.txt",ios
953

被折叠的 条评论
为什么被折叠?
