bring back random statements from vector?

i am a beginner. I want to create a program that every time you run brings back a different statement from an array or vector. I want to have about 100 of them. How would i do this?
well, get a random number 'i = rand() % number_of_elements'
then access an element of array/vector with 'my_array[i]'
Or you can use the random_shuffle() algorithm to randomize the vector or array. That's most efficient for returning the entire vector in random order and is useful when you want to return each element only once.
wow quick thanks guys!
Topic archived. No new replies allowed.