如一定要把數值賦予枚舉變數,則必須用強制類型轉換,如: a=(enum weekday)2; ... for(i=1;i<=30;i++){ switch(month[i]) { case a:printf(" %2d %c\t",i,'a'); ...
確定! 回上一頁