diff options
| author | jdhao <jdhao@hotmail.com> | 2021-11-21 23:26:45 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2021-11-21 23:26:45 +0800 |
| commit | b96a3ce762f07cd4ed80501af4098d7b29ab8b92 (patch) | |
| tree | a64dcf21069d7335369c04c3b1d72fbfbf5bc186 /my_snippets | |
| parent | b46a1e705513e4998598e7b9f0713e456924a8e0 (diff) | |
update snippets
Diffstat (limited to 'my_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 cd2a7dd..b810956 100644 --- a/my_snippets/cpp.snippets +++ b/my_snippets/cpp.snippets @@ -54,8 +54,9 @@ void printMat(const vector<vector<T>>& mat, const string& desc){ for (auto it1 = mat.begin(); it1 != mat.end(); it1++){ auto cur_vec = *it1; + cout << "["; for (auto it2 = cur_vec.begin(); it2 != cur_vec.end(); it2++){ - cout << *it2 << ((std::next(it2) != cur_vec.end()) ? ", " : "\n"); + cout << *it2 << ((std::next(it2) != cur_vec.end()) ? ", " : "]\n"); } } } |
