# HG changeset patch # User František Kučera # Date 1430665551 -7200 # Node ID a4c3f27b6be74f265ea5cb43b750cbfadef88a2d # Parent a6b5eb87350b72eee0c9132de49dc2ac044bc5a7 print argument lenght (bytes) diff -r a6b5eb87350b -r a4c3f27b6be7 c++/parameter-lister/CLI.cpp --- a/c++/parameter-lister/CLI.cpp Sun May 03 14:41:28 2015 +0200 +++ b/c++/parameter-lister/CLI.cpp Sun May 03 17:05:51 2015 +0200 @@ -11,7 +11,7 @@ int main(int argc, char* argv[]) { terminalCodes::Modifier fgGreen(terminalCodes::FG_GREEN); terminalCodes::Modifier fgReset(terminalCodes::FG_DEFAULT); - + cout << "INFO: " << fgGreen << "Parameter lister" << fgReset << " is starting" << endl; string command = argv[0]; @@ -26,6 +26,12 @@ }); + for (int i = 0; i < args.size(); i++) { + string s = args[i]; + cout << i + 1 << ":" << s.length() << " = \"" << s << "\"" << endl; + } + + return 0;