我想在cython中迭代c ++地图。怎么做?我已经尝试过了。但是它说编译错误迭代器首先没有属性。
我试过的代码:
from cython.operator cimport dereference as deref, preincrement as inc
....
cdef map[long,long].iterator it
....
it=cllasy.iswrong_class.begin()
while it!=cllasy.iswrong_class.end():
print ("wd",it.first,it.second)
inc(it)