title: How can I compare the member variables of two objects in C++?
body: <p>I have created an class Fraction in C++ that stores the numerator and denominator of a fraction, and has various methods to operate on these numbers. How would I compare the contents of one object to another? My thought was to pass a pointer to the second object to the first object's method that carries out the comparison. Any help would be much appreciated.</p>