64,662
社区成员
发帖
与我相关
我的任务
分享
#include<fstream>
using namespace std;
int main(int argc, char* argv[])
{
ofstream ofs("abc");
for(int i = 1 ; i<100;i++)
ofs.write( (const char*) &i , sizeof(int) );
return 0;
}
fstream fout;
fout.open("txt.txt", ios::out);
if (!fout) return;
fout << "12346878" << endl;
fout.close();