diff options
| author | jdhao <jdhao@hotmail.com> | 2021-12-04 23:47:50 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2021-12-04 23:47:50 +0800 |
| commit | 9e6a71c32df9659c2b0b2115e7c28afd710c68a0 (patch) | |
| tree | 9df332ce2c104419dff5708f2adc19c337e806fc /my_snippets/cpp.snippets | |
| parent | 50fafcffdb47b992eb6b545e8804460478de0c86 (diff) | |
update cpp snippet
Diffstat (limited to 'my_snippets/cpp.snippets')
| -rw-r--r-- | my_snippets/cpp.snippets | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/my_snippets/cpp.snippets b/my_snippets/cpp.snippets index b810956..907bd7a 100644 --- a/my_snippets/cpp.snippets +++ b/my_snippets/cpp.snippets @@ -42,8 +42,9 @@ void printList(const T& arr, const string& desc){ std::cout << desc << ": ["; for (auto it = arr.begin(); it != arr.end(); it++){ - std::cout << *it << ((std::next(it) != arr.end()) ? ", " : "]\n"); + std::cout << *it << ((std::next(it) != arr.end()) ? ", " : ""); } + std::cout << "]\n"; } endsnippet |
