std::basic_ios<CharT,Traits>::fill

Manages the fill character used to pad the output conversions to the specified field width.

# Declarations

CharT fill() const;
CharT fill( CharT ch );

# Parameters

# Return value

The fill character before the call to the function.

# Example

#include <iomanip>
#include <iostream>
 
int main ()
{
    std::cout << "With default setting : [" << std::setw(10) << 40 << "]\n";
    char prev = std::cout.fill('x');
    std::cout << "Replaced '" << prev << "' with '"
              << std::cout.fill() << "': [" << std::setw(10) << 40 << "]\n";
}

# See also