Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is an old version of boost. Click here for the latest version's documentation home page.
PrevUpHomeNext

Function template read_ini

boost::property_tree::ini_parser::read_ini

Synopsis

// In header: <boost/property_tree/ini_parser.hpp>


template<typename Ptree> 
  void read_ini(const std::string & filename, Ptree & pt, 
                const std::locale & loc = std::locale());

Description

Read INI from a the given file and translate it to a property tree.

[Note] Note

Clears existing contents of property tree. In case of error the property tree unmodified.

Parameters:

filename

Name of file from which to read in the property tree.

loc

The locale to use when reading in the file contents.

pt

The property tree to populate.

Throws:

ini_parser_error In case of error deserializing the property tree.

PrevUpHomeNext