ok, I have these structures:
I'm trying to pass a pointer to a deck to a function which will initialize it, but whenever I try to access members (e.g. d->cards[k].num) it gives me a segmentation fault error.Code:typedef struct card {
char face;
char suite;
int value;
int num;
} CARD;
typedef struct deck {
CARD cards[MAX_CARDS];
/* used cards */
int struck[MAX_CARDS];
} DECK;
any advice is greatly appreciated.