I am getting this error when compiling- Operands of '=' have incompatible types 'div_t [5]' and 'div_t *
I have played around with different ways of getting rid of this error but to no avail. Any help is appreciated.
This isn't the full program just what I whittled down to show the error.
Code:
//deck of pla8ing cards
#include <stdio.h>
#include <stdlib.h>
#define CARDS_PER_HAND 5
div_t *dealHand(void);
////////////////////////////////
///////// Main Program
int main(int argc, char *argv[])
{
div_t player[5];
player = dealHand();
//player=sortHand(player);
return 0;
}
//////deal hand //////////////
div_t *dealHand(void) {
div_t hand[5];
for(i=0;i< CARDS_PER_HAND;i++) {
hand[i]= div(i * 30,13);
printf("%d\n",hand[i].quot,hand[i].rem);
}
return hand ;
}