// FILE: card_demo.cpp #include // Provides cout and cin #include // Provides EXIT_SUCCESS #include #include #include "card.h" #include "deck.h" #include "player.h" using namespace std; int main( ) { Deck d; d.shuffle(); Card c = d.dealCard(); cout << "deal test " << c << endl; cout << endl; Player p("Joe"); cout << p.getName() << endl; p.addCard(c); p.addCard(d.dealCard()); cout << p.showHand() << endl; int numCards = 5; vector cards; srand((unsigned)time(0)); //seed the random number generator for (int i = 0; i < numCards; i++) { int rank = (rand() % 13) + 1; int suit = (rand() % 4); Card c(rank,(Card::Suit)suit); cout << "rank - " << rank << " " << c << endl; cards.push_back(c); } for (int i = 0; i < cards.size(); i++) cout << cards.at(i)<< endl; cards.erase(cards.begin()+2); cout <<"after"<