Category : libconfig

I can get a libconfig::Config object by readFile method in libconfig, but if i want to add something into this config, how can i do? here is my method: #include <libconfig.h++> #include <iostream> using namespace std; int main() { try{ libconfig::Config cfg; cfg.readFile("/root/mmm/config/backtest/spread.config"); libconfig::Setting & ss = cfg.getRoot().add("self_path", libconfig::Setting::TypeList); ss.add("huang", libconfig::Setting::TypeString); ss.add("xin", libconfig::Setting::TypeString); auto& array ..

Read more