The Microsoft Input/Output Stream Classes (iostream.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
ios::width
ios                                         Up Contents Index Back
──The Microsoft iostream Classes────────────────────────────────────────────
 
  int width( int nw );
  int width() const;
 
  Parameter   Description
 
  <nw>        The minimum field width in characters.
 
  Remarks
 
  The first overloaded width function sets the stream's internal field
  width variable to <nw>. When the width is 0 (the default), inserters
  insert only as many characters as necessary to represent the inserted
  value. When the width is not 0, the inserters pad the field with the
  stream's fill character, up to <nw>. If the unpadded representation of
  the field is larger than <nw>, the field is not truncated. Thus <nw> is
  a minimum field width.
 
  The internal width value is reset to 0 after each insertion or
  extraction.
 
  The second overloaded width function returns the current value of the
  stream's width variable.
 
  See Also
 
  ios setw manipulator
 
 
                                     -♦-