C++ 文件保存

 

 

文件保存:

#include <sstream>
#include <fstream>
using namespace std;

/*
save to path ./record/ */ static void save_to_file(string file, string str) { ofstream outfile; outfile.open("record/" + file, ios::binary | ios::app | ios::in | ios::out); outfile << str; outfile.close(); }

 

string组合:

 ostringstream oss;

 

end

posted @ 2018-11-06 17:21  戒骄戒躁-沉淀积蓄  阅读(945)  评论(0)    收藏  举报