code: обработка ошибок

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

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

@ -61,10 +61,11 @@ int main(int argc, char* argv[])
CURLcode res; CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
if(res != CURLE_OK){
fprintf(stderr, "curl_easy_perform() failed: %s\n",
curl_easy_strerror(res));
exit(1);}
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
cerr << res<<endl;
cerr << argc<<endl;
cerr << argv[0];
} }
return 0; return 0;
} }

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