diff options
Diffstat (limited to 'doc/snippets/Tutorial_std_sort.cpp')
-rw-r--r-- | doc/snippets/Tutorial_std_sort.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/snippets/Tutorial_std_sort.cpp b/doc/snippets/Tutorial_std_sort.cpp new file mode 100644 index 000000000..cde2a6f1b --- /dev/null +++ b/doc/snippets/Tutorial_std_sort.cpp @@ -0,0 +1,4 @@ +Array4i v = Array4i::Random().abs(); +cout << "Here is the initial vector v:\n" << v.transpose() << "\n"; +std::sort(v.begin(), v.end()); +cout << "Here is the sorted vector v:\n" << v.transpose() << "\n"; |