From f6b7958094c389bab26f5fe9b13fea154c18187f Mon Sep 17 00:00:00 2001 From: hwannee Date: Fri, 26 Oct 2018 00:21:14 -0400 Subject: [PATCH] Correct wrong bracket --- guide/english/cplusplus/vector/index.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/guide/english/cplusplus/vector/index.md b/guide/english/cplusplus/vector/index.md index 630a70feb7..87164f07f4 100644 --- a/guide/english/cplusplus/vector/index.md +++ b/guide/english/cplusplus/vector/index.md @@ -206,10 +206,13 @@ int main() sort(v.begin(), v.end(), [] (int i, int j) -> bool { return i < j; } ); + cout << "Vector Contents Sorted In Ascending Order:\n"; - for (int e : v) - cout << e << " "; - return 0; + for (int e : v){ + cout << e << " "; + } + + return 0; } ``` ### Sorting Vector In Descending Order @@ -226,9 +229,9 @@ int main(){ vector v{ 10, 5, 82, 69, 64, 70, 3, 42, 28, 0 }; sort(v.begin(), v.end(), greater()); - cout << "Vector Contents Sorted In Ascending Order:\n"; + cout << "Vector Contents Sorted In Descending Order:\n"; for(int e : v){ - cout << e << " "; + cout << e << " "; } return 0;