开发者

Header for MAXDOUBLE

In w开发者_如何学Gohat header is max value for double defined?


#include <limits>
int main()
{
  std::cout << "Maxvalue for double: " << std::numeric_limits<double>::max();
  return 0;
}


If you're using C++ the standard way of achieving this is with:

#include <limits>
std::numeric_limits< double >::max();


On my system (VS 10) it's float.h. The define is DBL_MAX 1.7976931348623158e+308


There is cfloat, which gives you DBL_MAX.


If you are working with VS, you can see this link: http://msdn.microsoft.com/en-us/library/s3f49ktz.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜