Hello,
I wrote this simple code:
YAML::Node n = YAML::LoadFile(file); // as described in the tutorial
I have no problems accessiong the contents of n, and the file exists. But as soon as i write
n["whatever"] = somevalue;
i get an YAML::BadSubscript exception (what(): operator[] call on a scalar). Is this a bug or are loaded nodes read-only? If i create the node by writing
YAML::Node n;
i can write into without any problem.
Thanks
Hello,
I wrote this simple code:
YAML::Node n = YAML::LoadFile(file); // as described in the tutorial
I have no problems accessiong the contents of n, and the file exists. But as soon as i write
n["whatever"] = somevalue;
i get an YAML::BadSubscript exception (what(): operator[] call on a scalar). Is this a bug or are loaded nodes read-only? If i create the node by writing
YAML::Node n;
i can write into without any problem.
Thanks