title: Use std::find on vector<class> to find matching class attribute
body: <p>Say I have a class <code>myClass</code> with 3 attributes in the constructor (<code>string value</code>, <code>int pos</code>, <code>int pos_2</code>).</p>
  
  <p>Now I make a <code>vector</code> of objects of said class.</p>
  
  <p>How would I search through <code>vector&lt;myClass&gt;</code> to find the index of any class objects with a <code>string</code> that matches a given <code>string</code>?</p>
  
  <hr>
  
  <p><strong>Example</strong>:</p>
  
  <p>Here's a (non-functional) attempt at finding a class object that has the string <code>hello</code> as its <code>string value</code>:</p>
  
  <pre><code>std::string to_find = "hello";
  std::vector&lt;myClass&gt;::iterator duplicate_it;
  duplicate_it = std::find(subrelation_vector.begin()-&gt;value, subrelation_vector.end()-&gt;value, to_find);
  int duplicate_pos = *duplicate_it-&gt;pos;
  </code></pre>