The Microsoft Input/Output Stream Classes (iostream.hlp) (Table of Contents; Topic list)
fstream::setmode
fstream                                     Up Contents Index Back
──The Microsoft iostream Classes────────────────────────────────────────────
 
  int setmode( int nMode = filebuf::text );
 
  Parameter   Description
 
  <nMode>     An integer that must be one of the static filebuf constants,
              as follows:
 
              Value             Meaning
 
              filebuf::text     Text mode (newline characters translated
                                to and from carriage return-linefeed
                                pairs).
 
              filebuf::binary   Binary mode (no translation).
 
  Remarks
 
  This function sets the binary/text mode of the stream's filebuf object.
  It may be called only after the file is opened.
 
  Return Value
 
  The previous mode; -1 if the parameter is invalid, the file is not open,
  or the mode cannnot be changed.
 
  See Also
 
  ios binary manipulator, ios text manipulator
 
 
                                     -♦-