V
V
Victor2013-10-28 19:44:24
C++ / C#
Victor, 2013-10-28 19:44:24

Recommend a C++ library for working with configs

Sectional config, like:

[Section1] #comment
var=value
var2=value

[Section2]
var=value
.
[Section2]
var=value
var2=value

Please note that the names of the sections can be the same, but I need the values ​​inside them not to overlap. Well, if there is still the possibility of recording.

Found cfgparser , but it is still sawing and sawing

Answer the question

In order to leave comments, you need to log in

6 answer(s)
N
nekipelov, 2013-10-28
@nekipelov

Boost.Program_options. Repetition of group (section) names is allowed.

B
bak, 2013-10-28
@bak

Recently, for configs, it’s more difficult than key: value using json. The JsonCpp library has a very convenient syntax: pastebin.com/w6AWWadr For key:value configs, I use a bike with this interface: pastebin.com/jfnFmEJ1

A
AxisPod, 2013-10-29
@AxisPod

Lua: habrahabr.ru/post/197300/ is not bad for configs.

0
0x3f00, 2013-10-29
@0x3f00

conf.h from the OpenSSL library.
WinAPI functions from the GetPrivateProfileSection() family.

V
Victor, 2013-10-29
@victor1234

While reading about boost::program_options, I found a link to such a Config4 * . Although this is not the format that I described, the list of features is extensive.

V
vasiliev, 2013-11-13
@vasiliev

If you are using Qt, you can look at the QSettings + ini format.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question