5
需要通過Internet傳輸存儲在ini文件中的系統配置。我使用boost來處理配置ini文件。如何將整個屬性樹保存爲字符串?將屬性樹提升爲字符串
需要通過Internet傳輸存儲在ini文件中的系統配置。我使用boost來處理配置ini文件。如何將整個屬性樹保存爲字符串?將屬性樹提升爲字符串
只要寫一個std::stringstream
:
std::ostringstream oss;
boost::property_tree::ini_parser::write_ini(oss, my_ptree);
std::string inifile_text = oss.str();
替換wstring
/wostringstream
適當