I\'m new to cURL and needed it for my assignment. And I\'m using C++ for this.
I have this particular line which works fine.
curl_easy_setopt(curl, C
CURLOPT_URL: Pass in a pointer to the actual URL to deal with. The parameter should be a char * to a zero terminated string...
If you hold the URL in a std::string
variable you should use std::string::c_str()
.
std::string URL = "http://www.google.com";
curl_easy_setopt(curl, CURLOPT_URL, URL.c_str());