Skip to content

Commit d6143fb

Browse files
author
Andrew Pardoe
committed
2 parents c11c7e5 + 27dc740 commit d6143fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CppCoreGuidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2699,7 +2699,7 @@ A `span` represents a range of elements, but how do we manipulate elements of th
26992699
for (int x : s) cout << x << '\n';
27002700

27012701
// C-style traversal (potentially checked)
2702-
for (int i = 0; i < s.size(); ++i) cout << x << '\n';
2702+
for (int i = 0; i < s.size(); ++i) cout << s[i] << '\n';
27032703

27042704
// random access (potentially checked)
27052705
s[7] = 9;

0 commit comments

Comments
 (0)