I need to be able to randomly select an object in C++ for a program I'm writing. Here's an example of what I'm trying to do:
Code:
class person
{
   int weight;
   int height;
   int age;
};

person bob, mary, john;
I want my program to randomly pick one of the three objects (bob, mary, or john) and list all of that person's stats (weight, height, and age). What's the easiest way to go about doing this? I'm sure I could make a huge and complex "switch" statement or a bunch of "if" commands, but there has to be an easier way than that.