Boost logo

Boost Users :

Subject: Re: [Boost-users] [property tree] silly beginners question
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2010-08-20 16:53:45

On Aug 20, 2010, at 1:37 PM, Dietmar Hummel wrote:

> Hi all!
> I am trying to read an xml file with property tree (first try).
> Because I have dots int the tag names I must use the extended version of the get functions.
> So here is the slightly modified example code, which sadly does'nt compile on vc2008.
> Probably its a totally silly error on my side...

No, it's laziness on mine. I still haven't updated some of the example code and the relevant parts of the docs. (Shame on me!) The extended get functions don't exist anymore. Instead, you need to explicitly construct path objects that use a different separator character.

> std::string m_file = pt.get< std::string >( '/', "debug/filename" );

Should be

std::string m_file = pt.get<std::string>(boost::property_tree::path("debug/filename", '/'));


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at