如何解决这个错误“错误C2668:'abs':模糊调用重载函数”
错误C2668:'abs':对重载函数的模糊调用
通过初始化变量= abs(dwSurfHeight)获取错误;
i am将visual studio 2008项目转换为视觉工作室2017.这两个版本的abs()功能有什么不同?
我尝试了什么:
尝试了abs(int(dwSurfHeight)),abs((长)(dwSurfHeight)),abs((long long)(dwSurfHeight))。然后我收到另一个错误错误LNK2026:module对SAFESEH图像不安全。我试图关闭/safesh:NO.then我得到一些符号未引用的错误。
error C2668: 'abs': ambiguous call to overloaded function
getting error by initializing a variable =abs(dwSurfHeight);
i am converting visual studio 2008 project to visual studio 2017.is the abs() function different in these two versions?
What I have tried:
tried abs(int(dwSurfHeight)),abs((long)(dwSurfHeight)),abs((long long)(dwSurfHeight)).then i am getting another error error LNK2026: module unsafe for SAFESEH image.I tried turning off /safesh:NO.then i am getting some symbol unreferenced errors.
dw
前缀dwSurfHeight
变量表明它是DWORD
,即无符号long
(参见 Windows数据类型(Windows) [ ^ ] )。
为什么(新鲜的地狱)你在无符号变量上调用abs
?
Thedw
prefix indwSurfHeight
variables indicates it is aDWORD
, i.e. anunsigned long
(see Windows Data Types (Windows)[^]).
Why (the fresh Hell) are you calling theabs
on unsigned variable?