Creating a simple configuration file and parser in C++

前端 未结 12 722
谎友^
谎友^ 2020-12-07 10:55

I am trying to create a simple configuration file that looks like this

url = http://mysite.com
file = main.exe
true = 0

when the program ru

12条回答
  •  执念已碎
    2020-12-07 11:35

    I've searched config parsing libraries for my project recently and found these libraries:

    • http://www.hyperrealm.com/libconfig/ - small but powerfull and easy-to-use library, examples of using are in the source package and here
    • http://pocoproject.org/docs/Poco.Util.PropertyFileConfiguration.html - a part of pocoproject. You can use abstraction in your code and behind that use various supported implementations (ini files, Xml configs, even environment variables)

提交回复
热议问题