From 43e4142deb35ae245ac14676164952e188345e7e Mon Sep 17 00:00:00 2001 From: ShirokovIV Date: Wed, 21 May 2025 18:40:22 +0300 Subject: [PATCH] update --- main.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index c3dea22..63c5fcd 100644 --- a/main.cpp +++ b/main.cpp @@ -23,21 +23,17 @@ Input input_data(istream& in, bool promt = false) { in >> lin.korz; return lin; } -size_t write_data(void* ptr, size_t size, size_t nmemb, void* stream) { - size_t written = fwrite(ptr, size, nmemb, stdout); - return written; -} int main(int argc, char* argv[]) { if (argc > 1) { CURL* curl = curl_easy_init(); if (curl) { curl_easy_setopt(curl, CURLOPT_URL, argv[1]); - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data); CURLcode res = curl_easy_perform(curl); if (res != CURLE_OK) { cerr << "cURL error: " << curl_easy_strerror(res) << endl; + exit(1); } curl_easy_cleanup(curl);