Overloading binary comparison operators
Operators of this type that are commonly overloaded are: ==, !=, <, >, <=, >=
Example:
bool operator==(const Point& p1, const Point& p2)
Two points are equal if they have the same coordinates.
Previous slide
Next slide
Back to first slide
View graphic version