I am not a professional C++ programmer and I apologize in advance if the question seems obvious. I use [this partially observable Markov Decision solver][1] for my problem which I coded based on the examples they provided
In my starmaze.h I have
1 2 3 4 5 6 7 8 9 10 11 12
class StarMazeProblem : public DSPOMDP,
public MDP,
public StateIndexer,
public StatePolicy {
public
ParticleUpperBound* CreateParticleUpperBound(std::string name = "DEFAULT") const;//?
ScenarioUpperBound* CreateScenarioUpperBound(std::string name = "DEFAULT",
std::string particle_bound_name = "DEFAULT") const;
ScenarioLowerBound* CreateScenarioLowerBound(std::string name = "DEFAULT",
std::string particle_bound_name = "DEFAULT") const;
}
In my starmaze.cpp script I defined these functions:
src/starmaze.cpp:397:76: error: default argument given for parameter 2 of 'despot::ScenarioLowerBound* despot::StarMazeProblem::CreateScenarioLowerBound(std::__cxx11::string, std::__cxx11::string) const' [-fpermissive]
string particle_bound_name="DEFAULT") const {
^~~~~
In file included from src/starmaze.cpp:1:0:
src/starmaze.h:101:27: note: previous specification in 'virtual despot::ScenarioLowerBound* despot::StarMazeProblem::CreateScenarioLowerBound(std::__cxx11::string, std::__cxx11::string) const' here
ScenarioLowerBound* CreateScenarioLowerBound(std::string name = "DEFAULT",
^~~~~~~~~~~~~~~~~~~~~~~~
src/starmaze.cpp: In member function 'virtual bool despot::StarMazeProblem::Step(despot::State&, double, despot::ACT_TYPE, double&, despot::OBS_TYPE&) const':
I appreciate if someone explain what I should modify to make my code works and the error gets fixed.
Thanks