【发布时间】:2020-01-25 12:10:12
【问题描述】:
如何在 boost::python:dict 上迭代 C++ ? 我在每个循环中都需要 key 和 value。
我的尝试是这样的:
for (auto x : MyBoostPythonDict.iteritems())
{
// determine key
// determine value
// ...
}
我收到了这个错误: C3312 找不到类型“boost::python::api::object”的可调用“结束”函数
【问题讨论】:
-
你用的是什么版本的python?
-
我使用python 2.7
-
你知道dict中的key和value的类型吗?
标签: python c++ python-2.7 boost