|
|
|
@ -37,9 +37,11 @@ Input input_data(std::istream& in, bool prompt)
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main(int argc, char* argv[]){
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
|
{
|
|
|
|
|
curl_global_init(CURL_GLOBAL_ALL);
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
if (argc > 1)
|
|
|
|
|
{
|
|
|
|
|
const char *url = argv[1];
|
|
|
|
@ -49,11 +51,18 @@ int main(int argc, char* argv[]){
|
|
|
|
|
{
|
|
|
|
|
curl_easy_setopt(curl, CURLOPT_URL, url);
|
|
|
|
|
curl_easy_perform(curl);
|
|
|
|
|
|
|
|
|
|
CURLcode res = curl_easy_perform(curl);
|
|
|
|
|
if (res != CURLE_OK)
|
|
|
|
|
{
|
|
|
|
|
cerr << "curl_easy_perform() failed: " << curl_easy_strerror(res) << endl;
|
|
|
|
|
exit(1);
|
|
|
|
|
}
|
|
|
|
|
curl_easy_cleanup(curl);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
auto in = input_data(cin,true);
|
|
|
|
|
auto bins = make_histogram(in.bin_count, in.numbers);
|
|
|
|
|
show_histogram_svg(bins);
|
|
|
|
|