Assuming no other color declaration is available, they mean the same thing. However, a different definition of color does exist, and enum color can be used to make sure this type is used.
enum color { red, blue, green }; color color(const char *); enum color a = red;
The second line indicates the return type as color and refers to enum color . The third line requires the enum keyword, because color otherwise refers to the function declared on the second line.
But for practical purposes, enum color and color pretty much mean the same thing.
source share