在C++中,pow有多个重载函数;

在dev中,pow(int,int)可以执行,但是在别的地方是不可以被编译的;会提示 :error C2668: “pow”: 对重载函数的调用不明确

【C++】关于pow函数的用法

可以看见,是没有pow(int,int)这个方法的;

正确的办法是pow(int,double(int));

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2023-03-20
  • 2022-12-23
  • 2023-03-09
  • 2021-08-31
  • 2022-12-23
猜你喜欢
  • 2021-07-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案