Error: identifier “MAXFLOAT” is undefined

后端 未结 1 722
独厮守ぢ
独厮守ぢ 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条回答
  •  猫巷女王i
    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 ).

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

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