Maybe what you want is to do this:
void printHandResults(struct Card (*hand)[]);
and this:
void printHandResults(struct Card (*hand)[]) {
}
What you were doing was passing a pointer to an array of struct variables in the main, BUT, the function was set to receive an array of pointers to struct variables and not a pointer to an array of struct variables! Now the type mismatch would not occur and thus, no warning.
Note that []
, the (square) brackets have higher precedence than the (unary) dereferencing operator *
, so we would need a set of parentheses ()
enclosing the array name and *
operator to ensure what we are talking about here!