add a missing bracket
This commit is contained in:
ZhangWangda 2016-01-26 14:20:38 -05:00
parent 379938d743
commit 67bf6a14ab

View File

@ -2623,7 +2623,7 @@ A `span` represents a range of elements, but how do we manipulate elements of th
for (int x : s) cout << x << '\n'; // range traversal (guaranteed correct) for (int x : s) cout << x << '\n'; // range traversal (guaranteed correct)
for (int i = 0; i<s.size(); ++i) cout << x << '\n'; // C-style traversal (potentially checked) for (int i = 0; i<s.size(); ++i) cout << x << '\n'; // C-style traversal (potentially checked)
s[7] = 9; // random access (potentially checked) s[7] = 9; // random access (potentially checked)
std::sort(&s[0],&s[s.size()/2); // extract pointers (potentially checked) std::sort(&s[0],&s[s.size()/2]); // extract pointers (potentially checked)
} }
##### Note ##### Note