From beb0d24a7917d31247467611c9e2d80a03e4d13b Mon Sep 17 00:00:00 2001 From: Oleg Date: Sat, 30 Sep 2023 22:22:33 +0300 Subject: [PATCH] perform --- lab01.depend | 5 +++-- lab01.layout | 32 ++++++++++++++++---------------- main.cpp | 7 ++++--- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/lab01.depend b/lab01.depend index c2f2376..31f9f23 100644 --- a/lab01.depend +++ b/lab01.depend @@ -3,12 +3,13 @@ -1694257548 source:c:\users\texas\desktop\lab01\main.cpp +1696098686 source:c:\users\texas\desktop\lab01\main.cpp - + + "histogram.h" "text.h" "svg.h" diff --git a/lab01.layout b/lab01.layout index da1f663..fb36717 100644 --- a/lab01.layout +++ b/lab01.layout @@ -2,44 +2,44 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/main.cpp b/main.cpp index c2f70e6..8544c76 100644 --- a/main.cpp +++ b/main.cpp @@ -2,9 +2,9 @@ #include #include #include -#include #include #include + #include "histogram.h" #include "text.h" #include "svg.h" @@ -63,12 +63,13 @@ download(const string& address) { CURL* curl = curl_easy_init(); if(curl) { CURLcode res; - res = curl_easy_perform(curl); + curl_easy_setopt(curl, CURLOPT_URL, address.c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer); + res = curl_easy_perform(curl); if(res != CURLE_OK){ cerr << curl_easy_strerror(res); exit(1);} @@ -84,7 +85,7 @@ int main(int argc, char* argv[]){ else { input = input_data(cin, true);} - const auto bins = make_histogram(input.numbers, input.bin_count); + const auto bins = make_histogram(input); show_histogram_svg(bins); return 0; }