title: Finding an object with equal member values
body: <p>So I have a <code>Card</code> class with <code>_suit</code> and <code>_rank</code> members:</p>
  <pre><code>class Card {    
  private:
      char _suit;
      int _rank;
  public:
      Card(char, int);     //Constructor
  
      char suit() const;   //Returns the _suit value
  
      int rank() const;    //Returns the _rank value
  }
  </code></pre>
  <p>I also have a vector <code>vector&lt;Card&gt; Deck</code>. What I would like to check is whether <code>Deck</code> has <code>Card</code>s that have the same <code>_rank</code> value. I have tried using <code>std::adjecent_find</code> but that only works for primitive data types(?). Of course a nested for loop could be used, but is there a more efficient alternative?</p>