请问:关于c++左端对齐...#include
......
cout (more...)
You can use <iomanip.h> =>
For formatted input/output, the file <iomanip.h> is very useful,
and we can say it is the key factor.
cout << setiosflags(ios::left); //to left-adjustify the output.
cout << setw(8) << "Hello" << endl;
The problem is solved. :) easy?
Do make yourself familiar with <iomanip.h>
Wish you a good day!
and we can say it is the key factor.
cout << setiosflags(ios::left); //to left-adjustify the output.
cout << setw(8) << "Hello" << endl;
The problem is solved. :) easy?
Do make yourself familiar with <iomanip.h>
Wish you a good day!