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

master
EfremovSI 1 год назад
Родитель 2eaf794295
Сommit 5135699b21

@ -63,17 +63,17 @@ return inn;
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
CURL *curl = curl_easy_init(); CURL *curl = curl_easy_init();
if (argc > 1) {
if(curl) { if(curl) {
CURLcode res; CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "http://uit.mpei.ru/study/courses/cs/lab03/marks.txt"); curl_easy_setopt(curl, CURLOPT_URL, "http://uit.mpei.ru/study/courses/cs/lab03/marks.txt");
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
cout << res;
return 0; return 0;
} }
}
bool flag; bool flag;
bool prompt; bool prompt;

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