#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> //声明枚举类型 enum Color { //枚举类型的可能取值,常量 RED, GREEN, BLUE }; int main() { //enum Color c = BLUE; printf("%d\n", RED); printf("%d\n", GREEN); printf("%d\n", BLUE); return 0; }