I've got a main.c file which includes all start up stuff. I've initialised the deck, but I am having trouble storing the temporary value of the array into a variable: `
enum suit
{
CLUB, DIAMOND, HEART, SPADE
};
typedef enum suit Suit;
enum face
{
ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK,
QUEEN, KING
};
typedef enum face Face;
struct card
{
Suit c_suit;
Face c_face;
};
typedef struct card Card;
void shuffle(Card * deck);
void shuffle(Card * deck)
{
int temp;
int y, x, t=0;
for (x = 52; x > 0 ; x--)
{
y = rand() % x;
temp = deck[x];
deck[x] = deck[y];
deck[y] = temp;
}
}
`