hyperrealm / libconfig

C/C++ library for processing configuration files
https://hyperrealm.github.io/libconfig/
GNU Lesser General Public License v2.1
1.11k stars 362 forks source link

how to overwrite current config's setting? #204

Closed nickhuangxinyu closed 3 years ago

nickhuangxinyu commented 3 years ago

For libconfig::Setting object, how to overwrite a setting?

For example, in my config: a = 1;

how to overwrite a in my c++ code?

I think libconfig::Setting.add("a", libconfig::Setting::TypeInt) = 3, not work.

hyperrealm commented 3 years ago

Please refer to the documentation. All of these things are covered in detail there.