Yaml-cpp, old api to new api , operator >>
我想把下面这句Yaml-cpp旧api格式的语句转换成新的api。如何将 doc[“Meta”][“type”] >> type 转换为新的 API,因为 operator >> 在新的 api 中被删除。谢谢
尝试以下方法:
|
1
2 |
typedef std::string MyType; // I believe, that you’re retrieving string
MyType x = doc[“Meta”][“type”].as<MyType>(); |
- 什么包含指针? fout->x.color 的类型是什么? TBH 你没有提供足够的信息。
来源:https://www.codenong.com/31918285/
