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

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

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

@ -54,9 +54,18 @@ input_data(istream& tin, bool prompt)
int main(int argc, char* argv[])
{
if(argc>1){
for(size_t i = 0; i < argc; i++)
cerr << "argv["<<i<<"]="<<argv[i]<<endl;
if(argc > 1){
CURL *curl = curl_easy_init();
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;
}
curl_global_init(CURL_GLOBAL_ALL);

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