From ab1e2fb915ea435086715caebf403d90b8403458 Mon Sep 17 00:00:00 2001 From: IshutinaYI Date: Mon, 5 Jun 2023 10:47:59 +0300 Subject: [PATCH] =?UTF-8?q?debug:=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fin_lab34.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/fin_lab34.cpp b/fin_lab34.cpp index 833d0ae..a24655f 100644 --- a/fin_lab34.cpp +++ b/fin_lab34.cpp @@ -35,19 +35,18 @@ input_data(istream &thread, bool &prompt){ } int -<<<<<<< HEAD main(int argc, char* argv[]){ curl_global_init(CURL_GLOBAL_ALL); - if (argc > 1) { - cout << argc << endl; - for (int i = 0; i < argc; i++){ - cout << argv[i] << endl; - } + CURL *curl = curl_easy_init(); + if(argc > 1) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, argv[1]); + res = curl_easy_perform(curl); + curl_easy_cleanup(curl); + cerr << curl_easy_strerror(res); + exit(1); } -======= -main(){ curl_global_init(CURL_GLOBAL_ALL); ->>>>>>> origin/main //CURLcode curl_global_init(CURL_GLOBAL_ALL); size_t font = 0; bool prompt = false;