Having the following operator declared in a string class, would it be correct to use it in a split class in the following way?
Operator:
bool CCadena::operator==(const CCadena& obj) const {
return strcmp(m_pText, obj.m_pText) == 0;
}
function:
if(m_nomLocal==nomEquip)
{
return true;
}
else if(m_nomVisitant==nomEquip)
{
return true;
}
else
{
return false;
}
I need to compare if the content of the nomlocal and visitor varianles are equal to the parameter nomEquip and return true of being so and false otherwise.