![](/img/trans.png)
[英]Convert char type '0'-'9' to int type and print to stdout in C language
[英]is there any easy way to convert int type to enum type in c language?
如何將int枚舉為c枚舉?
enum a b;
int c;
b = (a)c;
它不起作用。 錯誤消息是未聲明“ a”
(以gcc為單位)
正如您從聲明變量中已經知道的那樣,枚舉類型必須以單詞enum
作為前綴。
b = (enum a)c;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.