求助大佬 哪里出错了
#include<stdio.h>enum RGB (Red,Green,Blue);
int main(){
int color;
printf("0~2的值:");
scanf("%d",&color);
printf("你选择了");
switch(color){
case 0:printf("红色");break;
case 1:printf("绿色");break;
case 2:printf("蓝色");break;
}
return 0;
}
/*错误提示 2 6 C:\Users\WP-S10\Desktop\未命名3.cpp [Error] use of enum 'RGB' without previous declaration
2 15 C:\Users\WP-S10\Desktop\未命名3.cpp [Error] expected ')' before ',' token
2 21 C:\Users\WP-S10\Desktop\未命名3.cpp [Error] invalid type in declaration before ',' token
2 26 C:\Users\WP-S10\Desktop\未命名3.cpp [Error] expected initializer before ')' token*/