123456789101112131415
void Card::swap ( int &a, int &b ) { int temp = a; a = b; b = temp; } void Card::shuffle() { srand(time(0)); for(int i = 0; i<51; i++) { int ranNo = rand() % 52; swap(cards[i],cards[ranNo]); }
class Card { public: Card(); ~Card(); void swap(int&,int&); void shuffle(); string ToStr(); void combine(); private: CardType cards[52]; };