overloaded error

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
Your error message does not seem to have anything to do with the DeleteRobot. It only talks about constructor(s).
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
Double declaration?
Topic archived. No new replies allowed.