So I have a Card class with _suit and _rank members:
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
}
I also have a vector vector<Card> Deck. What I would like to check is whether Deck has Cards that have the same _rank value. I have tried using std::adjecent_find but that only works for primitive data types(?). Of course a nested for loop could be used, but is there a more efficient alternative?