width member function (of classes
ostream) sets the field width (i.e., the number of character positions in which a value should be output or the maximum number of characters that should be input) and returns the previous field width. If values output are narrower than the field width, fill characters are inserted as padding. A value wider than the designated width will not be truncated—the full number will be printed. The
width function with no argument returns the current setting.