Defined in header <fkYAML/node.hpp>
fkyaml::basic_node::begin¶
Returns an iterator to the first element of a container node value.
Throws a fkyaml::exception
if a basic_node does not have a sequence nor mapping value.
Return Value¶
An iterator to the first element of a container node value (either sequence or mapping).
Example
#include <iostream>
#include <fkYAML/node.hpp>
int main() {
// create a sequence node.
fkyaml::node n = {"foo", "bar"};
// get an iterator to the first element.
fkyaml::node::iterator it = n.begin();
std::cout << *it << std::endl;
return 0;
}
output: