11.5. -   FIFO-... 405

   ,    basic_i?stream, basic_of stream
basic_fstream   basic_?ilebu?. ,  
 - ,      
 fstream-.     , 
  pipe (),    ,    -
- attach().



#include <fstream>

// UNIX-
i?stream(int fd)
?stream(int fd)
ofstream(int fd)

// gnu C++
void attach(int fd)

11.5.1.    iostream-  
 

  iostream- (if stream, of stream  f stream),  
     .   if stream -
   ,   of stream   ,   
f stream         .     -
      -  -
   ISO,   UNIX-  Linux-  ++-
 iostream-   .   GNU
C++ iostreams        -
  if stream, of stream  f stream    attach (), -
   ifstream  ofstream. UNIX-  C++  Sun
        
 ifstream, ofstream  fstream.    
 

//. . .
int Fd[2] ;

Pipe(Fd) ;

ifstream IPipe(Fd[0]);

ofstream OPipe(Fd[l]);

  - .  IPipe  
  ,   OPipe .    
         -
      ()  
().  ++-,    attach (),  
     ifstream, ofstream  fstream, 
 .