VS2012 MFC 错误:error C2668: “pow”: 对重载函数的调用不明确

VS2012中,数学函数的参数检查更为严格,如pow(2, 45)会引起一个错误提示如下:


error C2668: “pow”: 对重载函数的调用不明确


d:program filesmicrosoft visual studio 8vcincludemath.h(575): 可能是“long double pow(long double,int)”


d:program filesmicrosoft visual studio 8vcincludemath.h(527): 或“float pow(float,int)”


d:program filesmicrosoft visual studio 8vcincludemath.h(489): 或“double pow(double,int)”


试图匹配参数列表“(int, int)”时


正确的使用为pow(2.0, 45)

你可能感兴趣的:(VS2012 MFC 错误:error C2668: “pow”: 对重载函数的调用不明确)