Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. bool operator == (const Friend &other) const;
  2. bool operator < (const Friend &other) const;
  3.  
  4. bool Friend::operator == (const Friend &other)const{
  5. bool isEqual = false;
  6. if (this->name == other.name &&
  7. this->age == other.age&&
  8. this->phoneNr == other.phoneNr){
  9. isEqual = true;
  10. }
  11.  
  12. return isEqual;
  13. }
  14. bool Friend::operator < (const Friend &other) const{
  15. bool isLesserThan = false;
  16. if (this->age < other.age){
  17. isLesserThan = true;
  18. }
  19. return isLesserThan;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement