aboutsummaryrefslogtreecommitdiff
path: root/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp')
-rw-r--r--doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp b/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp
new file mode 100644
index 000000000..e72e715d8
--- /dev/null
+++ b/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp
@@ -0,0 +1,4 @@
+VectorXi v = VectorXi::Random(4);
+cout << "Here is the vector v:\n";
+for(auto x : v) cout << x << " ";
+cout << "\n";