diff --git a/fin_lab34.cpp b/fin_lab34.cpp index 833d0ae..a24655f 100644 --- a/fin_lab34.cpp +++ b/fin_lab34.cpp @@ -35,19 +35,18 @@ input_data(istream &thread, bool &prompt){ } int -<<<<<<< HEAD main(int argc, char* argv[]){ curl_global_init(CURL_GLOBAL_ALL); - if (argc > 1) { - cout << argc << endl; - for (int i = 0; i < argc; i++){ - cout << argv[i] << endl; - } + CURL *curl = curl_easy_init(); + if(argc > 1) { + CURLcode res; + curl_easy_setopt(curl, CURLOPT_URL, argv[1]); + res = curl_easy_perform(curl); + curl_easy_cleanup(curl); + cerr << curl_easy_strerror(res); + exit(1); } -======= -main(){ curl_global_init(CURL_GLOBAL_ALL); ->>>>>>> origin/main //CURLcode curl_global_init(CURL_GLOBAL_ALL); size_t font = 0; bool prompt = false;