枚举类型
#include <stdio.h>
/**
* enum 定义,不用等号 =
*
*/
enum color
{
Red,
Green,
Blue,
Black,
White
};
int main()
{
enum color c1 = Blue;
printf("Blue is %d",c1);
return 0;
}
INFO
#include <stdio.h>
/**
* enum 定义,不用等号 =
*
*/
enum color
{
Red,
Green,
Blue,
Black,
White
};
int main()
{
enum color c1 = Blue;
printf("Blue is %d",c1);
return 0;
}