Christophe, you're right, I should explain why I'm not using libxml++... I'm using two libraries which, at root, are written in c (Gtk and libxml2). So the application code contains some c code anyway. Aron spoke my mind when he said he thought the library may be overload, for a few lines of code. I was struck by Stefan's use of modern syntax, and also tried std::string SomeVariable(reinterpret_cast<char*>(content)); Both solutions failed, which shows the problem, if simple, is not trivial. Przemysław's solution, a full cast, works, and gives the same results as stringstream, but removes a dependancy. I feel this may be more portable than my solution, and seems safer too. So I'm going with that. Thanks to Christophe for his 'getenv' hint. I found learning the basics of c++ very easy, but am always searching for good references on system interfacing and what might be called c++ 'commonplaces' ? e.g. subjects I've spent too much time looking at such as int/char casting, unix/posix, use of headers in linking compiled code... For me, Deoxygen was a word at the bottom of html pages until one source required me to build the database, which is when I realised what it was and how valuable it could be. I know beginners questions can be distracting. Four straight answers, and a problem solved. My thanks to all who posted,
Robert |