Sign in to follow this  

YAML (and some yaml-cpp)

Recommended Posts

Hi, is this a proper YAML document?
maxChannels: 37
 - name: Loitering
   stuff: blabla
 - name: Walk
   stuff: lalala

When parsing this with yaml-cpp I don't get an error. But if I'm starting to iterate through the nodes I stumble upon one uninitialized node (somewhere after "animations") which causes a crash. A little bit scary that yaml-cpp doesn't warn me. When I iterate through nodes, how do I read the node's "name"? I seem to be unable to find that info... Thanks for any advice!

Share this post

Link to post
Share on other sites
Turns out that I was accidentally indexing a Node* instead of using the overloaded operator[]. After correcting that error things became somewhat clearer. :)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this