I'm using boost property tree to store configuration data for my application.
In the configuration file I have an item named that looks like this. I'm wondering how I can iterate over the ServerList.
ServerList
{
server1 127.0.0.1:5000
server2 example.com
}
By the way the solution provided here, didn't seem to work for me: http://stackoverflow.com/questions/1794418/boost-property-tree-and-xml-parsing-problems So don't go and requote that. When I tried it I got this error:
config.cpp:47: error: invalid initialization of reference of type ‘boost::property_tree::wiptree&’ from expression of type ‘boost::property_tree::basic_ptree<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >’
make: *** [config.o] Error 1