From 398bea3c765b031540bd17841c71825dcb7b62c7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 3 Jun 2016 17:11:56 +0200 Subject: Add test, install support --- hello.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'hello.cpp') diff --git a/hello.cpp b/hello.cpp index 0dde4c9..fad8a40 100644 --- a/hello.cpp +++ b/hello.cpp @@ -1,6 +1,14 @@ #include -int main () +using namespace std; + +int main (int argc, char* argv[]) { - std::cout << "Hello, World!" << std::endl; + if (argc != 2) + { + cerr << "usage: " << argv[0] << " " << endl; + return 1; + } + + cout << "Hello, " << argv[1] << "!" << endl; } -- cgit v1.1