← 返回首页
GitHub - SSARCandy/ini-cpp: 📑 Yet another ini config parser for modern C++ · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

SSARCandy/ini-cpp

 master
Go to file
Code

Repository files navigation

More items

C++ INI Parser

Yet another .ini parser for modern c++ (made for cpp17), inspired and extended from inih.

Example

The config.ini's content is something looks like:

[section1] any=5 [section2] any_vec = 1 2 3
#include "ini/ini.h" int main() { inih::INIReader r{"./test/fixtures/config.ini"}; // Get and parse the ini value const auto& v1 = r.Get<std::string>("section1", "any"); // "5" const auto& v2 = r.Get<int>("section1", "any"); // 5 const auto& v3 = r.Get<double>("section1", "any"); // 5.0 const auto& v4 = r.GetVector<float>("section2", "any_vec"); // [1.0, 2.0, 3.0] const auto& v5 = r.GetVector<std::string>("section2", "any_vec"); // ["1", "2", "3"] // And also support writing to new ini file. r.InsertEntry("new_section", "key1", 5); // Create new entry inih::INIWriter::write("output.ini", r); // Dump ini to file return 0; }

To learn more, please refer to test folder, it covered ALL utilities.

Install

Simply copy the header file ini/ini.h to your project, then done.

About

📑 Yet another ini config parser for modern C++

Topics

Resources

License

Stars

50 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Footer

© 2026 GitHub, Inc.