From 470cdd315adf9270d7231c29ecd2e0b8d7b50c9c Mon Sep 17 00:00:00 2001 From: "Dima (LekomtsevDO)" Date: Mon, 19 May 2025 18:35:45 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20argc=20argv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/main.cpp b/main.cpp index 1c10aa4..02f1816 100644 --- a/main.cpp +++ b/main.cpp @@ -35,20 +35,20 @@ Input input_data(istream& inx, bool prompt) return in; } -int main() +int main(int argc, char* argv[]) { - curl_global_init(CURL_GLOBAL_ALL); + if (argc > 1) { + cout << "argc = " << argc << endl; + for (int i = 0; i < argc; ++i) { + cout << "argv[" << i << "] = " << argv[i] << endl; + } + return 0; + } - bool prompt = true; - auto in = input_data(cin, prompt); + curl_global_init(CURL_GLOBAL_ALL); + auto in = input_data(cin, true); auto bins = make_histogram(in.numbers, in.bin_count); - - double min, max; - - double bin_size = (max - min) / in.bin_count; - show_histogram_svg(bins); - return 0; }