From 02c974b46ad1acc29fdb8d5422af2774faea2f8f Mon Sep 17 00:00:00 2001 From: KirsanovES <KirsanovYS@mpei.ru> Date: Sun, 4 Jun 2023 23:28:42 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=84=D1=80=D0=B0=D0=B3=D0=BC=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=B4=D0=B0=20=D0=B8=D0=B7=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=D0=BC=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/main.cpp b/main.cpp index c611e35..ca3721b 100644 --- a/main.cpp +++ b/main.cpp @@ -13,6 +13,7 @@ struct Input { size_t bin_count{}; }; + Input input_data(istream& inx){ bool prompt= true; @@ -33,14 +34,16 @@ input_data(istream& inx){ int main(int argc, char* argv[]) { if (argc>1){ - for (size_t i=0;i<argc;i++){ - cout<<"argv["<<i<<"]= "<<argv[i]<<endl; - } - return 0; - } - else{ + 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); +}; +} curl_global_init(CURL_GLOBAL_ALL); auto in = input_data(cin); auto bins = make_histogram(in.numbers,in.bin_count); show_histogram_svg(bins); -}} +}