[EMAIL PROTECTED] wrote: > > I have build the DOM tree in the memory, i need to direct the output to a char > buffer instead of > cout << doc << endl; > how can i do that ?.
Linux (gcc): #include <strstream> #include <string> ostrstream os; os << doc << endl; char* buf = new char[os.pcount() + 1]; strncpy(buf, os.str(), os.pcount()]; buf[os.pcount()] = '\0'; Win32 (MSVC6): #include <strstrea.h> // I think. Smegging 8.3 character names ostringstream os; os << doc << endl; [etc] HTH, Mike.
