[c++]求助大神does not have any field named问题,谢谢啦~

ADXP905 2017-12-15 05:52:10
几乎小白,在Linux下安装一个网上开源的程序包,如下代码报错


#ifndef ODEPRECON_H
#define ODEPRECON_H

#include "odeStep.h"
#include "derivativeFlat.h"

class OdePrecon : public OdeStep<LinSpaceMap<Coefficients>,Coefficients>
{
OdeStep<DerivativeFlat,Coefficients>* ode;
public:
OdePrecon(OdeStep<DerivativeFlat,Coefficients>*Ode):OdeStep(Ode->derivative()),ode(Ode){}
Coefficients & step(Coefficients &Vec, double Tstart, double Tstep){
// pre-step action
ode->derivative()->update(Tstart,std::vector<std::complex<double> >(1,std::complex<double>(Tstart))); // communicate start time
ABORT("need to implement removeHighEnergies");
// ode->derivative()->removeHighEnergies(Vec);
// make step
ode->step(Vec,Tstart,Tstep);
// post-step
// ode->derivative()->removeHighEnergies(Vec);
return Vec;
}
unsigned int consistencyOrder() const {return ode->consistencyOrder();}
virtual std::string name() const {return "precon("+ode->name()+")";}
protected:
// unsigned int safetyFactor(){return ode->safetyFactor();}
};

#endif // ODEPRECON_H




===================================================================

错误提示

In constructor ‘OdePrecon::OdePrecon(OdeStep<DerivativeFlat, Coefficients>*)’:
error: class ‘OdePrecon’ does not have any field named ‘OdeStep’
error: no matching function for call to ‘OdeStep<LinSpaceMap<Coefficients>, Coefficients>::OdeStep()’
note: candidates are: OdeStep<Der, V>::OdeStep(Der*) [with Der = LinSpaceMap<Coefficients>, V = Coefficients]
note:OdeStep<LinSpaceMap<Coefficients>, Coefficients>::OdeStep(const OdeStep<LinSpaceMap<Coefficients>, Coefficients>&)

请问应该怎样修改呢,谢谢各位了,实在是能力不够完全不知道错在哪儿了,请大神指教
...全文
1408 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

3,881

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧