diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 5018874..61060ce 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -486,11 +486,12 @@ The second version leaves the reader guessing and opens more possibilities for u cin >> val; // ... int index = -1; // bad - for (int i = 0; i < v.size(); ++i) + for (int i = 0; i < v.size(); ++i) { if (v[i] == val) { index = i; break; } + } // ... }