- 链接地址:https://blog.csdn.net/lianghe_work/article/details/106087312
- 链接标题:38_等于和不等于(==、!=)运算符重载_重载双不等号-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:6498
//重载== ==出现在判断语句中 bool operator==(Person &ob) { if(strcmp(this->name, ob.name) == 0) { return true; } return false; } //重载!= !=出现在判断语句中 bool operator!=(Person &ob) { ._重载双不等号
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除
标签:重载双不等号