diff --git a/main.cpp b/main.cpp index a3f5fec..29e6ec5 100644 --- a/main.cpp +++ b/main.cpp @@ -43,8 +43,13 @@ int main(int argc, char* argv[]) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); 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); - cerr << res << " " << argc << " " << argv[0]; + } return 0; }