c++ enum rand code example Example: c++ enum rand enum Color {Red, Green, Blue}; Color color = Color(rand()%3);