From: Rafał Długołęcki Date: Tue, 12 May 2015 21:35:48 +0000 (+0200) Subject: Update example. X-Git-Tag: v0.2~2 X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=f4f7e7543fb56070a408da837cf4e42333504348;p=command.git Update example. --- diff --git a/src/main.cpp b/src/main.cpp index 42c44cb..06fbf1e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4,6 +4,7 @@ #include "option.h" #include "argument.h" #include "required.h" +#include "multiValue.h" #include "command.h" using namespace command; @@ -24,8 +25,8 @@ int main(int argc, char *argv[]) { try { Command command(argc, argv, { // new Argument("File path", [](std::string value)->void { std::cout << "Hello from lambda " << value << std::endl; }), - new Required(new Argument("File path", argument_function)), - new Option("f", "Optional file", option_function), + new Required(new MultiValue("-", new Argument("Input values", argument_function))), + new MultiValue(",", new Option("f", "Optional file", option_function)), new Option("h", "Help", void_function) });