[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [C++] popen and ofstream(int) with g++ 3.0

>> Mikael Hedin <mikael.hedin@irf.se> writes:

 > I have some trouble with tela.  When compiling with g++ 3.0, there is
 > no ofstream(int) function (as in STL).  This gives a problem when
 > using popen(), as it returns a FILE*, and tela then uses an ofstream
 > to read from the process.  I've used the patch below, but I'd say
 > it's an ugly hack.  What's the suggested way to use popen
 > functionality with STL?

 I just stumbled across your post...

 You might want to take a look at Nocolai Josuttis' fdstream package.
 He implements reading and writing from file descriptors.  Google for
 fdstream, it's the first hit.


Reply to: