title: C++ LibCurl - Converting CURLcode into a CString
body: <p>What would be the easiest way to convert the "res" variable (CURLcode) into a CString?</p>
  
  <p>Here's the standard example which compiles fine on my machine but I want to use this in a MFC app and display the result as a MessageBox. Any help is appreciated!</p>
  
  <pre><code>#include &lt;curl/curl.h&gt;
  
  int main(void)
  {
    CURL *curl;
    CURLcode res;
  
    curl = curl_easy_init();
    if(curl) {
      curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
      res = curl_easy_perform(curl);
  
      /* always cleanup */ 
      curl_easy_cleanup(curl);
    }
    return 0;
  }
  </code></pre>