枚举类型在C语言的定义
提问人:杨紫红发布时间:2020-11-17
enum 枚举名
{ 枚举值表 };
例:enum weekday{sun, mon, tue, wed, thu, fri, sat};
enum weekday week_end, workday;
或 enum weekday{sun,mon,tue,wed,thu,fri,sat}workday;
或 enum {sun,mon,tue,wed,thu,fri,sat}week_end;
{ 枚举值表 };
例:enum weekday{sun, mon, tue, wed, thu, fri, sat};
enum weekday week_end, workday;
或 enum weekday{sun,mon,tue,wed,thu,fri,sat}workday;
或 enum {sun,mon,tue,wed,thu,fri,sat}week_end;
继续查找其他问题的答案?
相关视频回答
回复(0)
点击加载更多评论>>