mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-17 12:44:40 +03:00
resolve #8, 修复示例检阅时产生的变量名错误
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user