I need to parse ini file using C++ with boost library. This file contains the multi keys. For example,
[section_1]
key_1=value_1
key_1=value_2
...
key_n=value_n
[section_2]
key1=value_1
key1=value_2
...
key_n=value_1
key_n=value_2
[]
...
[section_n]
...
I tried use the functional of boost library: the function boost::property_tree::ini_parser::read_ini()
, but it can't contain the multikey in ini file and return the exception. So I tried use the function boost::program_options::parse_config_file()
, but it's not what I need.
What functionality should I use to parse the ini file and for each section I can to get own structure with relevant key values?