Reputation: 18171
I have function that writes one section of ini file:
boolean saveSSVar()
{
using boost::property_tree::ptree;
ptree pt;
pt.put(SRV_ID, ID);
pt.put(SRV_LOG_LEVEL, LogLevel);
write_ini( INI_FILE_NAME, pt );
return true;
}
Problem is that it overwrites whole file instead one section. How to solve this problem?
Upvotes: 2
Views: 859
Reputation: 393174
Just
ptree
Note that not all information will roundtrip 100% (see the documentation for limitations)
See also: c++ boost library - writing to ini file without overwriting?
Upvotes: 1