VS2008中,对math.h中的数学函数的检查更严格,例如使用语句:A=A+aa*pow(10,i);会出现:
f:\mfc工程\c++ prom_prac\suma2008\suma2008\suma.cpp(12) : error C2668: “pow”: 对重载函数的调用不明确
1> d:\vs2008\vc\include\math.h(575): 可能是“long double pow(long double,int)”
1> d:\vs2008\vc\include\math.h(527): 或 “float pow(float,int)”
1> d:\vs2008\vc\include\math.h(489): 或 “double pow(double,int)”
1> 试图匹配参数列表“(int, int)”时
1>生成日志保存在“file://f:\MFC工程\C++ Prom_Prac\SUMA2008\SUMA2008\Debug\BuildLog.htm”
1>SUMA2008 - 1 个错误,0 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
此时应该将此语句改为:A=A+aa*pow(10.0,i);即刻解决问题。