夏老师零基础学习在Linux上编译调试C++项目视频课程
class stone {
private:
int _w, _h, _weight;
public:
stone(int w, int h, int we) : _w(w), _h(h), _weight(we) {}
// 重载运算符<
bool operator <(const stone& rhs) {
return this->_weight < rhs._weight;
}
int getWeight() {
return _weight;
}};int main() {