输出流7-5 Wdt(函数或 iset(int W)用于设置输出的字段宽度, 默认是0 #include <iostream. h> void main o cout<<"默认域宽="<<cout. width()<<"n"; cout<<"["; cout width(10)i //将宽度设置为10 cout < A cout < ] l 北大青鸟11 输出流 7-5 – width()函数或setw(int w)用于设置输出的字段宽度, 默认是0 #include <iostream.h> void main() { cout << "默认域宽 = " << cout.width () << "\n"; cout << "["; cout.width(10); //将宽度设置为 10 cout << "A"; cout << "]" ; }