Save a YAML Emitter content to a file with YAML-CPP
问题 I just started playing around with yaml-cpp, I managed to build it properly and run some of the examples from the yaml-cpp wiki but I can't find a way to save my emitter to a file. Is this not possible? I mean the PyYAML library has a 'dump' function for this. Is there no such functionality in yaml-cpp? Is there some workaround to converting a yaml emitter to a stl stream and then dumping this to a yaml file? Please let me know Thanks, Adam 回答1: The function Emitter::c_str() returns a NULL