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; }