{
// initialize deck array
unsigned int deck[SUITS][FACES] = { 0 };
srand(time(NULL)); // seed random-number generator
shuffle(deck); // shuffle the deck
// initialize suit array
const char *suit[SUITS] =
{"Hearts", "Diamonds", "Clubs", "Spades"};
// initialize face array
const char *face[FACES] =
{"Ace", "Deuce", "Three", "Four",
"Five", "Six", "Seven", "Eight",
"Nine", "Ten", "Jack", "Queen", "King"};
deal(deck, face, suit); // deal the deck
}
我不会为[FACES]中的每个const char值分配int值,例如将“ Deuce” = 2设置为