diff --git a/labor01.cpp b/labor01.cpp index 18d0954..3834d06 100644 --- a/labor01.cpp +++ b/labor01.cpp @@ -42,14 +42,17 @@ input_data(istream& inn, bool promt) { -int main(int argc, char* argv[]) { +int main(int argc, char* argv[1]) { if (argc > 1) { - cout << argc << "\n"; - for (int i = 0; i < argc; i++) { - cout << "argv[" << i << "] = " << argv[i] << "\n"; + 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; } - curl_global_init(CURL_GLOBAL_ALL); bool promt = true; auto in = input_data(cin, promt); auto bins = make_histogram(in.numbers, in.bin_count);