Created
May 8, 2014 03:02
-
-
Save autosquid/536faad4435558037436 to your computer and use it in GitHub Desktop.
parse ini with boost property tree (ptree)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/property_tree/ptree.hpp> | |
#include <boost/property_tree/ini_parser.hpp> | |
... | |
boost::property_tree::ptree pt; | |
boost::property_tree::ini_parser::read_ini("config.ini", pt); | |
std::cout << pt.get<std::string>("Section1.Value1") << std::endl; | |
std::cout << pt.get<std::string>("Section1.Value2") << std::endl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment