标签: c++ yaml-cpp
我想将以下句子转换为新的api,这是Yaml-cpp旧的api格式。如何转换 doc [“Meta”] [“type”]>>输入到新API,作为运算符>>在新的api中被删除。感谢
答案 0 :(得分:1)
尝试以下方法:
typedef std::string MyType; // I believe, that you're retrieving string MyType x = doc["Meta"]["type"].as<MyType>();