mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Switched the Iterator implementation to a dedicated helper class (to hide the specific implementation, since it's pretty messy and may change).
This commit is contained in:
@@ -20,7 +20,11 @@ void run()
|
||||
|
||||
YAML::Node doc;
|
||||
parser.GetNextDocument(doc);
|
||||
std::cout << doc;
|
||||
for(YAML::Iterator it=doc.begin();it!=doc.end();++it) {
|
||||
std::string item;
|
||||
*it >> item;
|
||||
std::cout << item << "\n";
|
||||
}
|
||||
} catch(YAML::Exception&) {
|
||||
std::cout << "Error parsing the yaml!\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user