code: add error (res)
Этот коммит содержится в:
5
main.cpp
5
main.cpp
@@ -50,6 +50,11 @@ int main(int argc, char* argv[])
|
|||||||
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
|
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
curl_easy_cleanup(curl);
|
curl_easy_cleanup(curl);
|
||||||
|
if(res != 0)
|
||||||
|
{
|
||||||
|
cerr << curl_easy_strerror(res);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool prompt = true;
|
bool prompt = true;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user