<分区>
Possible Duplicate:
C++ STL set update is tedious: I can't change an element in place
为什么这段代码提示我的参数是一个 const_iterator 而不是这样声明的?
void foo(std::set<int>::iterator it)
{
*it=2;
}
我收到错误:分配只读位置‘it.std::_Rb_tree_const_iterator<_Tp>::operator* with _Tp = int’