From 9565d8769f3ceb85ed763a31049d31d072371aea Mon Sep 17 00:00:00 2001 From: KorneevMA Date: Mon, 30 Sep 2024 07:25:59 +0300 Subject: [PATCH] test promt arguments --- main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 2dcec9b..4936bda 100644 --- a/main.cpp +++ b/main.cpp @@ -2,6 +2,7 @@ #include "histogram.h" #include "svg.h" #include +#include using namespace std; @@ -39,7 +40,13 @@ Input input_data(istream& sin, bool prompt) } } -int main() { +int main(int argc, char* argv[]) { + if (argc > 1) { + for (int x = 0; x > argc; x++) { + cout << "argv[" << x << "] = " << argv[x]; + } + return 0; + } Input in = input_data(cin, false); auto bins = make_histogram(in.numbers, in.bin_count); show_histogram_svg(bins);