jeudi 24 mai 2018

How to get random value from assigned enum in c++?

I want a random color from this enum:

enum Color {
red = 10,
black = 3,
pink = 6,
rainbow=99    
};

Color my_randowm_color = ...

How can i do that?




Aucun commentaire:

Enregistrer un commentaire