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

main
AkinshinaDA 2 недель назад
Родитель e0876930ca
Сommit 8a00f3062f

@ -36,13 +36,17 @@ input_data(istream& in, bool prompt){
return input; return input;
} }
int main(int argc, char* argv[]){ int main(int argc, char* argv[]){
if (argc>1){ if (argc >1 ){
for (size_t i =0; i<argc; i++){ CURL* curl = curl_easy_init();
cerr << "argv[" << i << "]= " << argv[i] << "\n"; if(curl){
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
res = curl_easy_perform(curl);
} }
curl_easy_cleanup(curl);
return 0; return 0;
curl_global_init(CURL_GLOBAL_ALL);
} }
curl_global_init(CURL_GLOBAL_ALL);
bool prompt; bool prompt;
auto in = input_data(cin, prompt); auto in = input_data(cin, prompt);
auto bins = make_histogram(in.numbers, in.bin_count); auto bins = make_histogram(in.numbers, in.bin_count);

Загрузка…
Отмена
Сохранить