filling or padding characters in c++

Sets c as the stream’s fill character.
 
Behaves as if member fill were called with c as argument on the stream on which it is inserted as a manipulator (it can be inserted on output streams).
 
This manipulator is declared in header <iomanip>.

Example

#include <iostream>     
#include <iomanip> //for setfill and setw

int main () 
{
  std::cout << std::setfill ('x') << std::setw (10);
  std::cout << 9 << std::endl;
  getchar();
  return 0;
}

Output

xxxxxxxxx9