From f58dd574d6d7c44b91c31df2f6ebf32baf0a95fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20D=C5=82ugo=C5=82=C4=99cki?= Date: Sun, 26 Apr 2015 14:22:44 +0200 Subject: [PATCH] Updated Examples in README. --- README | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README b/README index add8614..0bb82e9 100644 --- a/README +++ b/README @@ -3,10 +3,16 @@ Command, a C++ library for handling command line arguments Designing to be used like follows: Example: + + void some_function(std::string str) { + std::cout << "Some function" << std::endl; + } + command::Command command(argc, argv, { command::Option("f", "File path", [](std::string value)->void { cout << "Sth: " << value << endl; }), command::Argument("File path", []()->void { cout << "Sth: " << value << endl; }), command::Option("help", "Help description", [](void)->void { cout << "Sth: " << value << endl; }), - command::Option("verbose", "Verbose option description", &myClass->verbose) + command::Option("verbose", "Verbose option description", &myClass->verbose), + command::Option("verbose", "Verbose option description", some_function) }); -- 2.30.2