<分区>
我想使用 boost::python::list
创建一个列表列表。
我试过这段代码,但子列表似乎没有追加功能!
boost::python::list array;
boost::python::list temp;
for (int i = 0; i < max; i++)
{
array.append(temp);
for (int j = 0; j < max; j++)
{
array[i].append(0); //error! array[i] does not have "append" member
}
}
错误信息:
error: ‘boost::python::api::object_item’ has no member named ‘append’
distArray[i].append(0);