问题描述:

在把VC6.0 工程转到VS2005工程中可能会遇到下面的问题

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

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

d:\program files\microsoft visual studio 8\vc\include\math.h(575): 可能是“long double pow(long double,int)”

d:\program files\microsoft visual studio 8\vc\include\math.h(527): 或“float pow(float,int)”

 

d:\program files\microsoft visual studio 8\vc\include\math.h(489): 或“double pow(double,int)”

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

 

解决方法:

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

相关文章:

  • 2022-12-23
  • 2021-10-24
  • 2021-06-05
  • 2021-07-12
  • 2021-10-24
  • 2022-12-23
  • 2021-08-12
  • 2022-12-23
猜你喜欢
  • 2021-12-14
  • 2021-08-31
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案