[c++]求助大神does not have any field named问题,谢谢啦~
几乎小白,在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>&)
请问应该怎样修改呢,谢谢各位了,实在是能力不够完全不知道错在哪儿了,请大神指教