Okay, I get that. My other problem is implementing this with Robots. I use the same logic:
bool Valley::addRobot(string name, vp, int r, int c, Dir dir)
{
if (m_nrobots == MAXROBOTS)
return false;
else
{
m_robots[m_nrobots] = new Robot(name, ,r, c, dir);
return true;
}
}
The compiler says vp is undeclared, which makes sense since I haven't done that other than in the constructor. How do I do this? I thought about using another accessor function or so to declare it .. and someone said to pass it through something whivch I have no clue how to do .