Comparison of custom objects and operator overloading in C++
<p>Read <a href="http://stackoverflow.com/questions/1380463/sorting-a-vector-of-custom-objects">this</a> question about how to compare custom objects in C++.
I did not understand the operator overloading used here. What is the operator being overloaded here? Is it ()? What is the use of overloading that?</p>

<pre><code>struct MyStruct
{
    int key;
    std::string stringValue;

    MyStruct(int k, const std::string&amp; s) : key(k), stringValue(s) {}
};

struct less_than_key
{
    inline bool operator() (const MyStruct&amp; struct1, const MyStruct&amp; struct2)
    {
        return (struct1.key &lt; struct2.key);
    }
};
</code></pre>
