cURL / Mailing Lists / curl-library / Single Mail

curl-library

problem saving urlcode (string)

From: <informatik4u_at_web.de>
Date: Thu, 14 Apr 2005 12:45:48 +0200

Hi, i am programming under linux a programm which loads a website with a xml structur.
when i am trying to save the xmlcode string i get an empty file (1 byte large).

here is my code for reading the string:
...
res = curl_easy_perform(curl);
xmldata = res; // xmldata is a c++ string

here is my code for saving:

void saveData() {
   ofstream fout("xmldata.xml", ofstream::out);
   if (!fout)
   {
      cout << "error" << endl;
      return;
   }

   fout << xmldata;
   fout << flush;
   fout.close();
}

the xmldata string, i also print out on console and the code is there, but saving this string doesn't work.

does somebody know, how to make it work?
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
Received on 2005-04-14