|
|
@ -45,15 +45,16 @@ input_data(istream& stream, bool prompt) {
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (argc > 1) {
|
|
|
|
if (argc > 1) {
|
|
|
|
auto i = 0;
|
|
|
|
CURL* curl = curl_easy_init();
|
|
|
|
while (i < argc){
|
|
|
|
if(curl) {
|
|
|
|
cerr << "arg[" << i << "] = " << argv[i] << endl;
|
|
|
|
CURLcode res;
|
|
|
|
i++;
|
|
|
|
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
|
|
|
|
}
|
|
|
|
res = curl_easy_perform(curl);
|
|
|
|
return 0;
|
|
|
|
curl_easy_cleanup(curl);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
{
|
|
|
|
curl_global_init(CURL_GLOBAL_ALL);
|
|
|
|
//curl_global_init(CURL_GLOBAL_ALL);
|
|
|
|
bool prompt = true;
|
|
|
|
bool prompt = true;
|
|
|
|
auto in = input_data(cin, prompt);
|
|
|
|
auto in = input_data(cin, prompt);
|
|
|
|
vector<size_t> bins = make_histogram(in.numbers, in.bin_count, in.number_count, in.max_count);
|
|
|
|
vector<size_t> bins = make_histogram(in.numbers, in.bin_count, in.number_count, in.max_count);
|
|
|
|