1、“error LNK2019: 无法解析的外部符号 __Pow_int,该符号在函数 _powf 中被引用”
说明:程序包含了<math.h>或者<cmath>,并使用了powf()函数,所以出现上面链接错误。按照平常的思考,是“缺少.lib文件”,但是你会发现<math.h>不需要.lib文件,可能是系统已经包含了吧。
解决方法1:直接使用_Pow_int()函数即可!【PS:可能是powf()函数是在其他文件中重定义的,但系统没有包含该文件。】【出现位置:VS2010简单控制台应用程序】
2、d:\program files (x86)\microsoft visual studio 10.0\vc\include\cmath(44): error C2039: “pow”: 不是“`global namespace'”的成员
d:\program files (x86)\microsoft visual studio 10.0\vc\include\cmath(44): error C2873: “pow”: 符号不能用在 using 声明中
解决方法:将cmath.h文件中的using _CSTD pow;用//using _CSTD pow;来代替,就是注释起来。