Question
Create a "Card.h" (header file) for a class used to store information about a card from a deck of cards. Have three data members in the class (a) the card number (an integer), (b) the card denomination or value (a string) and (c) the card suit (a string).
Explanation / Answer
#include #include #include #include using namespace std; void dealCardSet (int[], int[], int [], int [], int); void showUserCards (int [], int [], int); void showCompCards (int [], int [], int); void getOneNewCard (int, int [], int [], int); void dealRandCard (int, int [], int[]); void bubblesort (int[], int[], int); void compBubbleSort (int [], int[], int); //void playwar int main () { int N, throwaway, cards[N], suit[N], compCards[N], compSuit[N]; unsigned seed = time(0); srand (seed); cout > N; dealCardSet (cards, suit, compCards, compSuit, N); showUserCards (cards, suit, N); showCompCards (compCards, compSuit, N); getOneNewCard (throwaway, cards, suit, N); bubblesort (cards, suit, N); compBubbleSort (compCards, compSuit, N); return 0; } void dealCardSet (int cards[], int suit[], int compCards [], int compSuit[], int N) { for(int a=0; a