다음을 통해 공유


noshowpoint

Displays only the whole-number part of floating-point numbers whose fractional part is zero.

ios_base& noshowpoint( 
   ios_base& _Str 
);

매개 변수

  • _Str
    A reference to an object of type ios_base, or to a type that inherits from ios_base.

반환 값

A reference to the object from which _Str is derived.

설명

noshowpoint is on by default; use showpoint and precision to display zeros after the decimal point.

The manipulator effectively calls _Str.unsetf(ios_base::showpoint), and then returns _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;
}
  

요구 사항

Header: <ios>

네임스페이스: std

참고 항목

참조

iostream 프로그래밍

iostreams 규칙