May 22, 2013 at 12:56pm UTC
hi,
i built a class name RobotDB, and i have a func thet delete the robot but when u try to build it at the cpp it give me an error:
1 2 3 4 5 6 7 8 9 10
void RobotDB::DeleteRobot(const std::string& rName)
{
for (RobotVec_cit rvec_cit=robots.begin(); rvec_cit=robots.end; rvec_cit++)
{
if (robots[rvec_cit]==rName)
{
robots.erase(rvec_cit);
}
}
}
and the mistake i got:
`void RobotDB::DeleteRobot(const std::string&)' and `void RobotDB::DeleteRobot(const std::string&)' cannot be overloaded d
the func in the header file is:
void DeleteRobot(const std::string& rName);
Last edited on May 22, 2013 at 1:11pm UTC
May 22, 2013 at 12:58pm UTC
Your error message does not seem to have anything to do with the DeleteRobot. It only talks about constructor(s).
May 22, 2013 at 1:08pm UTC
you right!
this is nor the error i have.
my error is:
`void RobotDB::DeleteRobot(const std::string&)' and `void RobotDB::DeleteRobot(const std::string&)' cannot be overloaded