指定十六进制数字和指数在科学记数法中显示为大写。
ios_base& uppercase(
ios_base& _Str
);
参数
- _Str
引用类型到 ios_base对象,或者从 ios_base继承的类型。
返回值
到 _Str 派生的对象的引用。
备注
默认,nouppercase 实际上是。
操控程序有效调用 _Str.setf(ios_base::uppercase),然后返回 _Str。
示例
// ios_uppercase.cpp
// compile with: /EHsc
#include <iostream>
int main( void )
{
using namespace std;
double i = 1.23e100;
cout << i << endl;
cout << uppercase << i << endl;
int j = 10;
cout << hex << nouppercase << j << endl;
cout << hex << uppercase << j << endl;
}
要求
页眉: <ios>
命名空间: std