set<int> s; s.insert(12); set<int>::iterator it = s.begin(); *it = 4; // error C3892: 'it' : you cannot assign to a variable that is const
为什么我不能改变普通迭代器指向的值,而不是const_iterator?
在我的代码迭代器中,由set :: find()返回.也许是更好的方法来从集合中选择特定的元素并改变他.