title: Find index of element in vector of pairs
body: <p>As stated in the title, I'm trying to find the index of an element in a vector of pairs. I have the following vector: <code>std::vector&lt;std::pair&lt;std::string, double&gt;&gt; dict</code>.
  The content of my dict is:</p>
  <pre><code>Name1 11
  Name2 9
  Name3 10
  Name4 12
  Name5 13
  </code></pre>
  <p>All I have in order to find the index is the <code>first</code> attribute of the <code>pair</code>. For example I have <code>Name5</code> and I would like to find 4. (Since <code>Name5</code> is the fifth element).
  Does anyone have an idea how to do it ?
  I tried something but it doesn't seem to work:</p>
  <pre><code>auto it = std::find(dict.begin(), dict.end(), movieName);
  </code></pre>
  <p>where <code>movieName</code> is an <code>std::string</code> with <code>&quot;Name5&quot;</code> inside.
  Thank you!</p>