3
是給我的問題
結構的代碼是如何設置一個結構的枚舉成員的值
typedef struct gamer
{
char name[MAXNAME];
Cell token;
unsigned score;
} Gamer;
枚舉是
typedef enum cell
{
BLANK, RED, CYAN
} Cell;
當我嘗試設置我的結構的價值Cell
成員我使用這段代碼;
gamer1->Cell = RED;
但是,當編譯它給我這個錯誤;
error: 'Gamer' has no member named 'Cell'". Thanks in advanced.
成員的名字是'token'。 'Cell'是它的數據類型。 – DyZ