- 博客(2)
- 资源 (1)
- 收藏
- 关注
原创 2021-06-15
C++运算符重载 1. 作为类成员函数实现 //.h文件声明 Shape operator+(const Shape &shape); //.cpp文件实现 Shape Shape:: operator+(const Shape &shape) { Shape shapeT; shapeT.length_ = this->length_ + shape.length_; shapeT.width_ = this->width_ + shape.width_; shapeT
2021-06-15 11:44:54
94
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人