From 0d77f9e5fbc5d7d0de92e71ff222c73371534f8e Mon Sep 17 00:00:00 2001 From: TiutinMO Date: Sat, 21 Jun 2025 18:13:52 +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=BE=20curl=20easy=20init=20=D0=B8=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B0=D1=80=D0=B3=D1=83?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index 2306637..a6811b7 100644 --- a/main.cpp +++ b/main.cpp @@ -35,9 +35,14 @@ Input input_data(istream& in, bool prompt) { int main(int argc, char* argv[]) { curl_global_init(CURL_GLOBAL_ALL); - if (argc > 1){ - cerr << "argv[0] = " << argv[0] << "argc = " << argc; - return 0; + if (argc > 1) { + 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); + } } auto in = input_data(cin, true); auto bins = make_histogram(in.numbers, in.bin_count);