11.5. -   FIFO-... 411

typedef output_iterator_tag iterator_category;

typedef void value_type;

typedef void difference_type;

typedef void pointer;

typedef void reference;

ostream_iterator(ostream& _s) : _M_stream(&_s),

_M_string(0) {}
ostream_iterator(ostream& _s, const char* _c)

: _M_stream(&_s), _M_string(_c) {}

ostream_iterator<_Tp>& operators(const _Tp& _value) {
*_M_stream  _value;

if (_M_string) *_M_stream  _M_string;

return *this;

}

ostream_iterator<_Tp>& operator*() { return *this; }
ostream_iterator<_Tp>& operator++() { return *this; }
ostream_iterator<_Tp>& operator++(int) { return *this; }
};

  ostream_iterator     
ostream.  ostream_iterator    ostream   -
.   istream_iterator   
ostream_iterator.      istream (   
 ostream).    istream_iterator  ostream_iterator
  iostream-,        -
 ,      
istream_iterator     ,    -
   ostream_iterator     .
 ,     ,  
 (11.2  11.2.1),      . -
 11.2   ,   11.2.1  .
 ""       
 fork ()  execl ().  ,     -
 ,      -
 11.2.1    execl ().

//  11.2

10 int main(int argc, char *argv[])

11 {

12

13   int Size,Pid,Status,Fdl[2], Fd2[2];

14   pipe(Pdl); pipe(Pd2);

15   strstream Buffer;

16   char Value[50] ;

17   float Data;

18   vector<float> X(5,2.1221), Y;

19   Buffer  Fdl[0]  ends;

20   Buffer  Value;

21   setenv("Fdin",Value,1) ;

22   Buffer.clear() ;

23   Buffer  Fd2[l]  ends;

24   Buffer  Value;

25   setenv("Fdout".Value,1);

26   Pid = fork();