Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You have a sequence of data, and you need to jumble it into some random order.
Use the random_shuffle standard algorithm, defined in <algorithm>. random_shuffle takes two random-access iterators, and (optionally) a random-number generation functor, and rearranges the elements in the range at random. Example 7-3 shows how to do this.