summaryrefslogtreecommitdiff
path: root/mhello/hello.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-07-20 08:55:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-07-20 08:55:11 +0200
commit9d20ba45831e60f2146b1a338866d59bb81dc362 (patch)
tree8719b704b374a2806f2a8450687cf1d9fe0f7105 /mhello/hello.cxx
parent8bb21cfef3955e42bab30ca2dd074f29be5c2c36 (diff)
Add modularized version
Diffstat (limited to 'mhello/hello.cxx')
-rw-r--r--mhello/hello.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/mhello/hello.cxx b/mhello/hello.cxx
new file mode 100644
index 0000000..7aa6c8a
--- /dev/null
+++ b/mhello/hello.cxx
@@ -0,0 +1,22 @@
+// file: hello.cxx -*- C++ -*-
+
+import std.core;
+import std.io;
+import hello;
+
+using namespace std;
+
+int
+main (int argc, char* argv[])
+{
+ if (argc < 2)
+ {
+ cerr << "usage: hello <name>..." << endl;
+ return 1;
+ }
+
+ using hello::say;
+
+ for (int i (1); i != argc; ++i)
+ say (argv[i]);
+}