Error: identifier “MAXFLOAT” is undefined

后端 未结 1 706
独厮守ぢ
独厮守ぢ 2021-01-15 03:02

I am trying to convert a Xcode project (link) to a VS2008 solution.

In a cuda filetype .cu, the term MAXFLOAT is used. I am adding the foll

相关标签:
1条回答
  • 2021-01-15 03:18

    MAXFLOAT is a non-standard parameter. Use one of the following, portable alternatives:

    • In C: use the standard library FLT_MAX (defined in <float.h>).

    • In C++: use std::numeric_limits<float>::max (defined in <limits>). You may still use C's FLT_MAX, but include <cfloat> instead.

    0 讨论(0)
提交回复
热议问题