C++ Streams and the underlying file descriptor

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sat Apr 1 00:00:00 GMT 2000


> So will the new libstdc++ provide such a way?

If you compile the current CVS libstdc++ with _STREAM_COMPAT, you get
a filedesc() method on an fstream object, returning the file
descriptor. Alternatively, you can use fstream::rdbuf()->fd()
(which filedesc() is a short-hand for).

Regards,
Martin


More information about the Libstdc++ mailing list