The structure's code that is giving me problems is
typedef struct gamer
{
char name[MAXNAME];
Cell token;
unsigned score;
} Gamer;
The enum is
typedef enum cell
{
BLANK, RED, CYAN
} Cell;
When I try to set the value of my struct Cell
member I use this code;
gamer1->Cell = RED;
however when compiling it gives me this error;
error: 'Gamer' has no member named 'Cell'". Thanks in advanced.
You should do gamer1->token = RED;
token
is the member of the struct and not Cell
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With