resolve #8, 修复示例检阅时产生的变量名错误

This commit is contained in:
Changkun Ou
2018-04-09 05:14:50 +02:00
parent b686e8c1cf
commit 703bcb570a
2 changed files with 3 additions and 3 deletions

View File

@@ -163,8 +163,8 @@ int main() {
}
// 需要重新定义一个新的变量
const std::vector<int>::iterator itr2 = std::find(vec.begin(), vec.end(), 3);
if (itr != vec.end()) {
const std::vector<int>::iterator itr2 = std::find(vec.begin(), vec.end(), 3);
if (itr2 != vec.end()) {
*itr2 = 4;
}