This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: C++ Streams and the underlying file descriptor
- To: kevinatk at home dot com
- Subject: Re: C++ Streams and the underlying file descriptor
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Mon, 17 Jan 2000 00:37:50 +0100
- CC: libstdc++ at sourceware dot cygnus dot com
- References: <388240D9.2D99AEBD@home.com>
> 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