From 16e3d2607a6c527a994d592033c144b091a09eb3 Mon Sep 17 00:00:00 2001 From: byvs Date: Wed, 22 May 2024 00:05:52 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7?= =?UTF-8?q?=D0=BA=D0=B0=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=20=D0=BF=D0=BE=20?= =?UTF-8?q?=D1=81=D0=B5=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main.cpp b/main.cpp index b1e2334..9bd5001 100644 --- a/main.cpp +++ b/main.cpp @@ -37,14 +37,17 @@ Input input_data(istream& stream, bool prompt) int main(int argc, char* argv[]) { - cout << argc << "\n\n\n"; if (argc > 1){ - for (int i = 0; i < argc; i++){ - cerr << "argv[" << i << "]" << argv[i] << "\n"; + curl_global_init(CURL_GLOBAL_ALL); + CURL *curl = curl_easy_init(); + if(curl) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, argv[1]); + res = curl_easy_perform(curl); + curl_easy_cleanup(curl); } return 0; } - curl_global_init(CURL_GLOBAL_ALL); bool prompt = true; auto in = input_data(cin, prompt); auto bins = make_histogram(in.numbers, in.bin_count);