| <<< Low-level I/O using String Stream | Index | Fill Character >>> |
Manipulator std::setw( n ) determines minimum output width n.
Requires header
#include <iomanip>
If output is shorter than the field width n, the output is padded with fill characters.
#include <iostream>
#include <iomanip>
using namespace std;
int main () {
cout << setw( 40 ) << "Hello";
return 0;
}
/*
Output:
Hello
*/
| <<< Low-level I/O using String Stream | Index | Fill Character >>> |