C++11獲取double型別的最大最小值

Cosmop01itan發表於2019-02-20
#include <iostream>
#include <locale>

using   namespace   std;

int     main()
{
    //使用template <class T> numeric_limits;
    //http://www.cplusplus.com/reference/limits/numeric_limits/
    cout << "double maxvalue" << numeric_limits<double>::max() << endl;
    cout << "double minvalue" <<  numeric_limits<double>::min() << endl;
    return 0;
}

相關文章