home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_11_07
/
1107106a
< prev
next >
Wrap
Text File
|
1993-05-04
|
411b
|
22 lines
// adjust.cpp: Justify output
#include <iostream.h>
#include <iomanip.h>
main()
{
cout << '|' << setw(10) << "hello" << '|' << endl;
cout.setf(ios::left,ios::adjustfield);
cout << '|' << setw(10) << "hello" << '|' << endl;
cout.fill('#');
cout << '|' << setw(10) << "hello" << '|' << endl;
return 0;
}
// Output
// | hello|
// |hello |
// |hello#####|