Ambiguous overload call to abs(double)

后端 未结 4 1091
孤街浪徒
孤街浪徒 2020-12-23 11:06

I have the following C++ code:

#include 
#include       // per http://www.cplusplus.com/reference/clibrary/cmath/abs/

// snip .         


        
4条回答
  •  无人及你
    2020-12-23 11:45

    Use fabs() instead of abs(), it's the same but for floats instead of integers.

提交回复
热议问题