numeric_limits::digits10

형식은 정밀도의 손실 없이 나타낼 수 있는 자릿수를 반환 합니다.

static const int digits10 = 0;

반환 값

수 정밀도의 손실 없이 형식을 나타내는 10 진수입니다.

예제

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

using namespace std;

int main( )
{
   cout << numeric_limits<float>::digits10 <<endl;
   cout << numeric_limits<double>::digits10 <<endl;
   cout << numeric_limits<long double>::digits10 <<endl;
   cout << numeric_limits<int>::digits10 <<endl;
   cout << numeric_limits<__int64>::digits10 <<endl;
   float f = (float)99999999;
   cout.precision ( 10 );
   cout << "The float is; " << f << endl;
}
  

요구 사항

헤더: <limits>

네임 스페이스: std

참고 항목

참조

strstreambuf Class