← Operator Overloading

Point Equality

medium

Add operator== so a == b compares two Point2Ds member-wise, true only when both x and y match. This is the direct C++ analogue of Module 4’s std::string == – except this time you’re the one defining what equality means for the type, since Point2D isn’t a standard type with equality already built in.

Your solution

"Run" uses the sample stdin ("1 2 1 2"). "Submit" checks your code against all 3 test cases.

Test results

Submit your solution to run it against all test cases.

Hints

    Reference solution