Ok so I have a couple enums right now, and I need a way to randomly assign one of a few different options to an object. Can I just use rand() to assign this, since enums are really just an int value?
1 2
enum color {White = 0, Brown, Black};
color = rand()%3;
Not sure if this works, or if there is a better way