Behaves as if a call to the stream's member ios::fill with c as argument was made.
The fill character is used in output insertion operations to fill spaces when results have to be padded to the field width.
This manipulator is declared in header <iomanip>, along with the other parameterized manipulators: resetiosflags, setiosflags, setbase, setprecision and setw. This header file declares the implementation-specific smanip type, plus any additional operator overload function needed to allow these manipulators to be inserted and extracted to/from streams with their parameters.
- Character to be used as fill character.
Return ValueUnspecified. This function should only be used as a stream manipulator.
This code uses setfill to set the fill character to 'x'. The output of this example is something similar to:
|setw||Set field width (manipulator function)|
|ios::fill||Get/set the fill character (public member function)|