Issues in searching through the vector?
<p>I have a vector of the form given below (in C++):</p>

<pre><code> vector&lt;pair&lt;int,int&gt; &gt; u;
</code></pre>

<p>Now when the first element of u.first becomes equal to 12 then I want to break from the loop. I am using the following code for this:</p>

<pre><code> while(1){
    if((find(u.begin().first, u.end().first, 12)!=u.end().first))
            {
                    break;
            } 
   }
</code></pre>

<p>However, it gives me the error that </p>

<pre><code>     'unable to resolve identifier first'
</code></pre>
