From 4452f1638fcdfd7ae61f5280afce80a6e4be7528 Mon Sep 17 00:00:00 2001 From: MachulinaDV Date: Sat, 3 Jun 2023 21:40:34 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 0e9d37f..31bef32 100644 --- a/main.cpp +++ b/main.cpp @@ -1,6 +1,8 @@ #include #include #include +#include +#include #include #include "histogram.h" #include "text.h" @@ -46,7 +48,12 @@ int main(int argc, char* argv[]) CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, argv[1]); res = curl_easy_perform(curl); - curl_easy_cleanup(curl); + if (res != 0) + { + cout << curl_easy_strerror(res); + exit(1); + } + } return 0; } @@ -55,5 +62,6 @@ int main(int argc, char* argv[]) auto B = make_histogram(in.A, in.bin); show_histogram_svg (B); + system("pause"); return 0; }