aboutsummaryrefslogtreecommitdiffstats
path: root/tutorial/chapter-10-3/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/chapter-10-3/main.cpp')
-rw-r--r--tutorial/chapter-10-3/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tutorial/chapter-10-3/main.cpp b/tutorial/chapter-10-3/main.cpp
new file mode 100644
index 000000000..88594765d
--- /dev/null
+++ b/tutorial/chapter-10-3/main.cpp
@@ -0,0 +1,13 @@
+//![0]
+// main.cpp
+
+import std;
+
+int main()
+{
+ std::vector<int> numbers = {1, 2, 3, 4, 5};
+ std::ranges::for_each(numbers, [](int n) { std::cout << n << ' '; });
+ std::cout << std::endl;
+ return 0;
+}
+//![0]