共用方式為


numeric_limits::radix

傳回整數的基底,稱為基底編號,在型別的表示。

static const int radix = 0;

傳回值

型別表示整數的基底。

備註

這個基底為 2 預先定義的整數型別和指數引發的基底,或是 FLT_RADIX,預先定義的浮點型別。

範例

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

using namespace std;

int main( )
{
   cout << "The base for type float is:  "
        << numeric_limits<float>::radix
        << endl;
   cout << "The base for type int is:  "
        << numeric_limits<int>::radix
        << endl;
   cout << "The base for type long double is:  "
        << numeric_limits<long double>::radix
        << endl;
}
  

需求

標題: <limits>

命名空間: std

請參閱

參考

strstreambuf Class