From 30b630b5b7294354f26c2887b60fd9e40f05e0b2 Mon Sep 17 00:00:00 2001 From: seanjs Date: Mon, 25 Feb 2019 04:17:43 -0500 Subject: [PATCH] Realign indentation and checkstyle of bracket (#29205) * Realign indentation and checkstyle of bracket * Update index.md --- guide/english/cplusplus/vector/index.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/guide/english/cplusplus/vector/index.md b/guide/english/cplusplus/vector/index.md index 87164f07f4..b01aff7dd3 100644 --- a/guide/english/cplusplus/vector/index.md +++ b/guide/english/cplusplus/vector/index.md @@ -196,12 +196,11 @@ int main(){ } ``` In C++11, you can also sort with lambda function, which can be useful. -```cpp11 -#include +```cpp +#include using namespace std; -int main() -{ +int main(){ vector v {3, 1, 2}; sort(v.begin(), v.end(), [] (int i, int j) -> bool { return i < j; @@ -212,7 +211,7 @@ int main() cout << e << " "; } - return 0; + return 0; } ``` ### Sorting Vector In Descending Order