#include #include #include class DeckOfCards { private: int deck[53]; int index; public: DeckOfCards() { for(int i=0; i<52; i++) { deck[i]=i+1; } } int dealCard() { index++; if (index>=52) { index=0; shuffle(); } return deck[index]; } void shuffle() { int j=0; int temp=0; for (int i=51; i>1; i--) { j = rand() % 51 + 1; if (0 < j && j < i) { temp=deck[i]; deck[i]=deck[j]; deck[j]=temp; } } } }; void showHand(int hand[], const int size); char findCard(int card); int main() { const int size=4; srand(time(NULL)); DeckOfCards deck; int hand[size]; deck.shuffle(); for (int i=0; i<13; i++) { for (int j=0; j