标签:c语言
#include<stdio.h>
void main()
{ enum season {spring,summer,autumn,winter}s1,s2;
s1=summer;
s2=(enum season)2;
printf("s1=%d,s2=%d\n",s1,s2);
}
本文出自 “努力奋斗,互相提高” 博客,请务必保留此出处http://c10086.blog.51cto.com/6433044/1413759
编程题:为枚举类型变量赋值。将整型值强制类型转换成枚举类型赋值,布布扣,bubuko.com
编程题:为枚举类型变量赋值。将整型值强制类型转换成枚举类型赋值
标签:c语言
原文地址:http://c10086.blog.51cto.com/6433044/1413759