Share via


uppercase

指数表記 10 進表記の 16 桁の数字と指数部は大文字で表示されることを指定します。

ios_base& uppercase(
   ios_base& _Str
);

パラメーター

  • _Str
    ios_baseオブジェクト、または ios_baseから型への参照。

戻り値

_Str が派生したオブジェクトへの参照。

解説

既定では、nouppercase が有効になります。

マニピュレーターは、_Str.setfios_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

参照

関連項目

入出力ストリームのプログラミング

入出力ストリームの規則