title: find a pair in set c++
body: <p>if I have a set which contains pairs of int,</p>
  
  <pre><code>set&lt;pair&lt;int,int&gt; &gt; cells;
  </code></pre>
  
  <p>how can I find whether a pair exits in the set using 'find'. I can use 'find' for set with one value but cant do it for a pair.</p>
  
  <p>I am trying like,</p>
  
  <pre><code> cells.insert(make_pair(1,1));
   set&lt;int,int&gt;::iterator it;
   it=cells.find(pair&lt;int,int&gt;(1,1));
  
  error: no match for 'operator=' in 'it = cells.std::set&lt;_Key, _Compare, _Alloc&gt;::find&lt;std::pair&lt;int, int&gt;, std::less&lt;std::pair&lt;int, int&gt; &gt;, std::allocator&lt;std::pair&lt;int, int&gt; &gt; &gt;((*(const key_type*)(&amp; std::pair&lt;int, int&gt;((* &amp;1), (* &amp;1)))))'|
  </code></pre>
  
  <p>Has anyone got any ideas? Thanks!</p>