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