1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
// using the fill character
#include <iostream> // std::cout
int main () {
char prev;
std::cout.width (10);
std::cout << 40 << '\n';
prev = std::cout.fill ('x');
std::cout.width (10);
std::cout << 40 << '\n';
std::cout.fill(prev);
return 0;
}
| |