title: Efficient way to search a vector of structs for a specific ID?
body: <p>I have a vector of structs <code>Data</code> which has an integer data member <code>ID</code>. I need to search if it contains an instance of a specific ID. I had to do it this way:</p>
  
  <pre><code>int DataSize = 0;
  for(unsigned count = 0; count &lt; Data.size(); count++)
  {
      if(ID == Data[count].ID)
          DataSize++;
  }
  </code></pre>
  
  <p>Where <code>ID</code> is previously defined. Any more  efficient way to search a vector of objects ? Especially when it is a part of an embedded application. </p>