yaml-cpp
yaml-cpp copied to clipboard
Node double assignment and as<double> error.
I am setting a node with "1663.1234567891011". After that I am calling it using as
Example code is given below.
int main() {
YAML::Node node;
double val = 1663.1234567891011;
node["my_val"] = val;
std::cout << "Value read: " << node["my_val"].as<double>() << "\n";
return 0;
}
Output:
Value read: 0.000450628