使用操纵器标志 std::right
要么
这有效......
#include<iostream>
using std::cout;
using std::endl;
#include<iomanip>
using std::setw;
int main(){
int x = 12345;
cout << "Blah Blah Blah" << endl << setw(80) << x << endl;
system("pause");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7611 次 |
| 最近记录: |