The Microsoft Input/Output Stream Classes (iostream.hlp) (Table of Contents; Topic list)
ifstream::attach
ifstream                                    Up Contents Index Back
──The Microsoft iostream Classes────────────────────────────────────────────
 
  void attach( filedesc fd );
 
  Parameter   Description
 
  <fd>        A file descriptor as returned by a call to the run-time
              function _open or _sopen; filedesc is a typedef equivalent
              to int.
 
  Remarks
 
  Attaches this stream to the open file specified by <fd>. The function
  fails when the stream is already attached to a file. In that case, the
  function sets ios::failbit in the stream's error state.
 
  See Also
 
  filebuf::attach, ifstream::fd
 
 
                                     -♦-