Back to course home
0% completed
Vote For New Content
Error in 'operator<' for C++ version
Dmytro Bibik
Jun 30, 2025
Less operator for Point class has mistake, it should be const instead of return const value
bool operator<(const Point& p) const { return p.distFromOrigin() > this->distFromOrigin(); }
instead of
const bool operator<(const Point& p) { return p.distFromOrigin() > this->distFromOrigin(); }
0
0
Comments
Comments
On this page