|
Boost Users : |
Subject: Re: [Boost-users] [boost::property_tree] how to put to paths with '/' slashes?
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2011-05-12 04:42:51
On 09.05.2011 19:37, Julien Claassen wrote:
> Hello everyne!
> I'm just looking at the property_tree and wonder, if I can do
> something like this:
> ptree my_tree;
> my_tree.put('/',"/path/to/my.node","hello world");
> The get functions support this syntax, but I didn't see anything
> corresponding to it with put ?
> Any ideas, workarounds?
Actually, the syntax has changed, and your put call won't work. The
correct syntax is:
my_tree.put(path("path/to/my.node", '/'), "hello world");
my_tree.get(path("path/to/my.node", '/'));
Sebastian
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net