特牛网址导航

38_等于和不等于(==、!=)运算符重载_重载双不等号-CSDN博客

网友收藏
//重载== ==出现在判断语句中 bool operator==(Person &ob) { if(strcmp(this->name, ob.name) == 0) { return true; } return false; } //重载!= !=出现在判断语句中 bool operator!=(Person &ob) { ._重载双不等号