I am trying to use filenames as the key in boost::PropertyTree
However, the '.' character in a filename such as "example.txt" causes an additional layer to be added within the property tree. The most obvious solution would be to replace '.' with another character, but there is likely a better way to do this, such as with an escape character.
In the following example, the value 10 will be put in the node 'txt', a child of 'example'. Instead, I want the value 10 to be stored in the node 'example.txt'.
ptree pt;
pt.put("example.txt", 10);
How can I use the full filename for a single node?
Thanks in advance for your help!