c++写入txt

用ofstream 输出流,
#include <fstream>

ofstream outf; 
outf.open("abc.txt");
outf<<123<<endl;
outf.close();

posted @ 2017-10-16 15:54  xzh1993  阅读(316)  评论(0编辑  收藏  举报