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