共用方式為


numeric_limits::min

傳回型別的最小值標準化。

static Type min( ) throw( );

傳回值

型別的最小值標準化。

備註

最小標準化的值是型別的 int 和 FLT_MIN INT_MIN 型別的 float。 傳回值是有意義的,如果 is_bounded 是 true ,或者 is_signed 是 false。

範例

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

using namespace std;

int main( )
{
   cout << "The minimum value for type float is:  "
        << numeric_limits<float>::min( )
        << endl;
   cout << "The minimum value for type double is:  "
        << numeric_limits<double>::min( )
        << endl;
   cout << "The minimum value for type int is:  "
        << numeric_limits<int>::min( )
        << endl;
   cout << "The minimum value for type short int is:  "
        << numeric_limits<short int>::min( )
        << endl;
}
  

需求

標題: <limits>

命名空間: std

請參閱

參考

strstreambuf Class