Share via


noshowpoint

は浮動小数点数の小数部がゼロによってだけを示す整数。

ios_base& noshowpoint(
   ios_base& _Str
);

パラメーター

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

戻り値

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

解説

noshowpoint は既定で; 小数点以下のゼロを表示するために showpoint精度 を使用します。

マニピュレーターは、_Str.unsetfios_base::showpoint () を呼び出し、_Strを返します。

使用例

// ios_noshowpoint.cpp
// compile with: /EHsc
#include <iostream>

int main( ) 
{
   using namespace std;
   double f1= 5.000;
   cout << f1 << endl;   // noshowpoint is default
   cout.precision( 4 );
   cout << showpoint << f1 << endl;
   cout << noshowpoint << f1 << endl;
}
  

必要条件

ヘッダー: <ios>

名前空間: std

参照

関連項目

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

入出力ストリームの規則