include <stdio.h> enum ENUMTEST { A,B,C };enum ENUMTEST aaa(int i)//注意要加原型。类似于你定义int ,float之类的 { if(i==0) return A;if(i==1) return B;if(i==2) return C;} int main(){ printf("%d",aaa(1));} ...