Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool operator == (const Friend &other) const;
- bool operator < (const Friend &other) const;
- bool Friend::operator == (const Friend &other)const{
- bool isEqual = false;
- if (this->name == other.name &&
- this->age == other.age&&
- this->phoneNr == other.phoneNr){
- isEqual = true;
- }
- return isEqual;
- }
- bool Friend::operator < (const Friend &other) const{
- bool isLesserThan = false;
- if (this->age < other.age){
- isLesserThan = true;
- }
- return isLesserThan;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement