
29 Apr
2006
29 Apr
'06
9:50 p.m.
"Stephen Dolan" wrote:
file = ptree.get<std::string>("config.filename");
Personally, I don't think its a good idea to define new syntaxes and pass them around as strings. It would be a bit more effort to implement, but I think (something like) the following would be preferable:
file = ptree.get<std::string>["config"]["filename"]
If you store the keys themselves in configuration or if you have to implement interface to a scripting engine the strings are very, very handy. /Pavel