diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 5b3ccab..11b2645 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -370,7 +370,7 @@ The second version leaves the reader guessing and opens more possibilities for u string val; cin >> val; // ... - int index = 0; // bad + int index = -1; // bad for (int i = 0; i < v.size(); ++i) if (v[i] == val) { index = i;