DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
iostream examples

Filebuf

Both libraries contain a filebuf class for using streams to do I/O. It is declared in fstream.h in the iostream library. The stream library had constructors that implied the use of filebufs. In the iostream library these constructors are replaced by constructors of certain derived classes. The old usage:

   int fd ;
   istream in(fd) ;	// file descriptor
   ostream out(fd) ;	// file descriptor
is replaced by:
   int fd ;
   ifstream in(fd) ;	// file descriptor
   ofstream out(fd) ;	// file descriptor


The optional extra arguments of the stream constructors (for specifying whitespace skipping and ``tying``) are not supported. The equivalent functionality is supported by format state variables.
Next topic: Interactions with stdio
Previous topic: Incore formatting

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005