I used yaml-cpp, the yaml syntax library, and I went crazy because my yaml document was not completely parsed. It turns out because the constructor should have given a link, not an object.
wrong code:
ifstr; YAML::Parser parser(ifstream("items9.yml"));
correct code:
ifstream ifstr("items9.yml"); YAML::Parser parser(ifstr);
The man told me that he should not compile, I use visual C ++ 10. Is this normal behavior and should I know about it, is the library incorrectly designed or visually C ++ mistakenly accepts the code?
source share