今天一个人说他的程序出了个错误如下:

call of overloaded `pow(int&, int&)" is ambiguous

 

代码如下

f = pow(2,4);

google一下才发现,是参数不对,pow(double, int)

所以要强转。

原来这个pow是一个老的C语言函数,是不支持重载的。。必需参数要一致。。

相关文章:

  • 2021-11-14
  • 2022-12-23
  • 2022-03-03
  • 2021-06-04
  • 2021-12-03
  • 2021-12-18
  • 2021-09-30
  • 2021-08-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2022-12-23
  • 2021-11-15
  • 2022-12-23
  • 2021-11-18
相关资源
相似解决方案