C++11获取double类型的最大最小值

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/CosmopolitanMe/article/details/87833961
#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;
}

猜你喜欢

转载自blog.csdn.net/CosmopolitanMe/article/details/87833961