Hi!
I'm trying to implement the easy curl function to get a website, curl_easy_setopt(curl, CURLOPT_URL, m_sURL);
, where the third argument is the only one that i give, and it's in this part of the code:
...
public:
string m_sURL;
URL() : m_sURL("http://www.google.com") { }
...
Now, when I call curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com");
everything works fine. But if instead, I want to dynamically submit my own URL with m_sURL like this: curl_easy_setopt(curl, CURLOPT_URL, m_sURL);
, doesn't work.
I'm using cout << endl << "Usando: " << m_sURL << endl;
right before calling curl_easy_setopt... and it looks like it's what it should be, but cURL says it can't resolve the hostname. So there must be some hidden character I can't see in m_sURL?
Thanks.