title: How can I create a std::set of structures?
body: <p>I need to create a <code>stl::set</code> of structures. Therefore, I wrote the following:</p>
  <pre><code>stl::set &lt;Point&gt; mySet; // Point - name of the structure.
  </code></pre>
  <p>Then I tried to add a structure instance to <code>mySet</code> as follows:</p>
  <pre><code>Point myPoint;
  mySet.insert(myPoint);
  </code></pre>
  <p>However, I get several compilation errors (error C2784, error C2676):</p>
  <blockquote>
  <p>1&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfunctional(125): error C2784: bool std::operator &lt;(const std::vector&lt;_Ty,_Ax&gt; &amp;,const std::vector&lt;_Ty,_Ax&gt; &amp;): failed to bring the argument to a template &quot;const std::vector&lt;_Ty,_Ax&gt; &amp;&quot; from&quot;const Point&quot;</p>
  <p>1&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xfunctional(125): error C2676: binary &quot;&lt;&quot;: &quot;const Point &quot;does not define this operator or a conversion to a type acceptable to the integrated operator</p>
  </blockquote>
  <p>How do I get my code compiled?</p>