Assume I have a libconfig::config object, can i readFile for several times like this:
libconfig::Config cfg;
cfg.readFiles("./a.cfg");
cfg.readFiles("./b.cfg");
and what will happen if a.cfg and b.cfg have same key?
If this doesnt work, is there any methods can let me merge two config files' setting into one object?
At first, it seems that method is
readFile()notreadFiles()unless I'm checking incorrect library.Second, everytime
readFile()is called, values in config will be reset. So aftercfg.readFiles("./b.cfg");you will not havea.cfgconfiguration anymore.