我是 C++ 新手,这是我的问题:我需要这个数量:
h = pow(mesh.V()[i0],1.0/3);
但是每当我编译程序时都会收到此错误消息:
call of overloaded ‘pow(const double&, double)’ is ambiguous
如果我写
double V = mesh.V()[i0];
h = pow(V,1.0/3);
我得到:
call of overloaded ‘pow(double&, double)’ is ambiguous
现在我想我明白 const double& 和 double& 指的是什么,但是我怎样才能将 const double& 转换为 double 呢?
谢谢!