|
|
|
@ -3,6 +3,7 @@
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include "histogram.h"
|
|
|
|
|
#include "text.h"
|
|
|
|
|
#include <curl/curl.h>
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
struct Input {
|
|
|
|
@ -30,7 +31,19 @@ Input input_data(istream& in, bool prompt)
|
|
|
|
|
return inn;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
int main(int argc, char*argv[]) {
|
|
|
|
|
curl_global_init(CURL_GLOBAL_ALL);
|
|
|
|
|
if (argc > 1)
|
|
|
|
|
{
|
|
|
|
|
CURL *curl = curl_easy_init();
|
|
|
|
|
if(curl) {
|
|
|
|
|
CURLcode res;
|
|
|
|
|
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
|
|
|
|
|
res = curl_easy_perform(curl);
|
|
|
|
|
curl_easy_cleanup(curl);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
auto in = input_data(cin, true);
|
|
|
|
|
auto bins = make_histogram(in.numbers, in.bin_count);
|
|
|
|
|
show_histogram_svg(bins);
|
|
|
|
|