diff --git a/main.cpp b/main.cpp index 15e61af..498a824 100644 --- a/main.cpp +++ b/main.cpp @@ -26,11 +26,6 @@ Input input_data(istream& stream, bool prompt) { Input in; - if (prompt){ - cerr << "Enter number of bins: "; - } - stream >> in.bin_count; - in.numbers.resize(number_count); if (prompt){ @@ -41,6 +36,11 @@ Input input_data(istream& stream, bool prompt) { stream >> in.numbers[i]; } + if (prompt){ + cerr << "Enter number of bins: "; + } + stream >> in.bin_count; + if (prompt){ cerr << "Enter image height: "; } @@ -55,11 +55,18 @@ Input input_data(istream& stream, bool prompt) { int main(int argc, char* argv[]){ if (argc > 1){ - auto i = 0; - while (i < argc){ - cerr << "arg[" << i << "] = " << argv[i] << endl; - i++; - } + + 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); + } + return 0; }