code: загрузка файла по сети

Этот коммит содержится в:
2024-05-26 15:23:06 +03:00
родитель e034e80ec5
Коммит 362b8bc328

Просмотреть файл

@@ -46,9 +46,14 @@ input_data(istream& in, bool prompt) {
int
main(int argc, char* argv[]){
CURL *curl = curl_easy_init();
if (argc>1){
cout << argc;
cout << argv[0];
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);