![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
白菜---
额
展开
-
C++指针复制的问题
C++指针复制的问题原创 2022-09-16 11:09:59 · 343 阅读 · 1 评论 -
C++运算符重载的实质
今天回顾了C++运算符重载,在类中写一个成员函数 Person operator+(Person &p) { Person temp; temp.ma = this->ma + p.ma; temp.m_b = this->m_b + p.m_b; return temp; } 调用的时候直接Person p3 = p1+p2; 实际上是Person p3=p1.operator+(p2); operator...原创 2021-09-26 20:52:13 · 127 阅读 · 1 评论