Сравнение массивов char
Нужно сравнить массивы char в перегрузке операторов с помощью цикла или strcmp, не знаю как это реализовать
bool Person::operator==(const Person &p)const{
return this->year == p.year && name ==p.name && this->surname == p.surname;
}
bool Person::operator!=(const Person &p)const{
return !(this->year == p.year && this->name == p.name && this->surname == p.surname);
}
bool Person::operator>=(const Person &p)const{
return !(*this < p);
}
bool Person:: operator<=(const Person &p)const{
return !(*this > p);
}
bool Person::operator>(const Person &p)const{
return (this->year > p.year);
}
bool Person::operator<(const Person &p)const{
return (this->year < p.year);
}