View Single Post
Old Nov 30th, 2006, 6:58 PM   #18
aznballerlee
Hobbyist Programmer
 
Join Date: Nov 2006
Posts: 111
Rep Power: 2 aznballerlee is on a distinguished road
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 .
aznballerlee is offline   Reply With Quote