What value does the compiler give an array created with an enumerated typedef? For example, I want to do this check:
Code:
void switch_comps_card (Card comp_hand[5], const int wDeck[][13], const char *wFace[], const char *wSuit[], int *top_of_deck)
{
int i = 0;
do
{
if(comp_hand[i] == NULL)
{
deal(wDeck, wFace, wSuit, top_of_deck, comp_hand, (i+1));
}
i++;
}while(i<5);
}
However, it says, theres an invalid operand to binary == (have 'Card' and 'Void *')
So if I can't compare the array to NULL what can I check for? Basically, comp_hand is an array that stores 5 cards for poker. I want to check if there is no card in each index of the array. Usually with an integer array I can use:
Code:
int myArray[10] = {0}
and then check for 0's to see if the indexed array has been given a value of not 0. But how can I do this if the array is of type Card which is a typdef data type?