I'm using Boost Property Tree to load ini configuration files.
Using this library, I'm able to load each configuration file into one boost::property_tree::ptree object. Now I want to load multiple configuration files in one ptree object.
How can I do this job? Or how can I merge ptrees into one object?

有帮助吗?

解决方案

Do you mean to treat all the individual ini files as one big ini file? If so, you may just read each individual file into a string and then append all the strings together. Finally, load that string into boost::property_tree::ptree.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top