code: добавление кода cURL

master
KonovalovaAA 2 лет назад
Родитель 3951d00019
Сommit c88ad95f59

@ -20,7 +20,7 @@
<iostream> <iostream>
<vector> <vector>
1684760047 source:c:\users\79156\desktop\3\main.cpp 1684761954 source:c:\users\79156\desktop\3\main.cpp
<iostream> <iostream>
<vector> <vector>
<cmath> <cmath>

@ -55,8 +55,17 @@ input_data(istream& tin, bool prompt)
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]<<endl; if(curl)
{
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
cerr << res<<endl;
cerr << argc<<endl;
cerr << argv[0];
}
return 0; return 0;
} }
curl_global_init(CURL_GLOBAL_ALL); curl_global_init(CURL_GLOBAL_ALL);

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