I'm confused about how to use random.uniform to select a member of an enum.

Say I have an enum like

    enum Animals
    {
      cat  = 0,
      dog = 1,
      chimpanzee = 2
    }

I want to select a random animal. So far I've been trying to do uniform(Animals), but every time I try to compile that, I get a "does not match any function template declaration" error.

Am I misunderstanding how this function is meant to be used?

Reply via email to