Learning C and need to populate array of five struct elements but I can't seem to figure out how to pass the struct array to a function and I keep getting error:
error: conflicting types for 'dealFiveHand'
Here is the code:
#define HAND_SIZE 5
void dealFiveHand(struct Card *wHand[]);
struct Card {
char suit;
char face;
};
int main(void)
{
struct Card *hand[HAND_SIZE];
dealFiveHand(hand);
}
void dealFiveHand(struct Card *wHand[])
{
...
}
Do I need to define and initialize a pointer and then pass that pointer to the function?