-5

![编译错误]

无论我在相关行中进行什么更改,我都会一遍又一遍地收到此编译错误。如您所见,它将我发送到stl_iterator.h文件。

我不知道问题可能是什么。

有任何想法吗?

4

2 回答 2

7

punc_vecconst,所以你必须使用一个const_iterator.

于 2012-05-09T14:28:19.743 回答
4

似乎punc_vec已声明const,因此punc_vec.begin()返回 a const_iterator,而不是 a iterator。将行更改为:

for(std::vector<char>::const_iterator i_vec=(punc_vec).begin();/*...*/)
于 2012-05-09T14:29:08.207 回答