From b594b729f0dfdcb0e85abeac0001db53d469b030 Mon Sep 17 00:00:00 2001 From: "Lab4 (ChaginSA)" Date: Sun, 4 Jun 2023 18:01:28 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=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 --- main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 6db82c1..c54c857 100644 --- a/main.cpp +++ b/main.cpp @@ -52,15 +52,19 @@ inp >> in.bin_count; int main(int argc, char* argv[]) { - if (argc>1){ + 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); + if (res != 0) { + cout << curl_easy_strerror(res); + exit(1); + } curl_easy_cleanup(curl); } -return 0; + return 0; } curl_global_init(CURL_GLOBAL_ALL);