random_shuffle « STL Algorithms Modifying sequence operations « C++






1.std::random_shuffle a vector
2.Use back_insert_iterator to insert element into a vector
3.Use random_shuffle to shuffle all elements randomly
4.Use random_shuffle to shuffle elements with self-written random number generator
5.Randomize elements in a vector with random_shuffle(scores.begin(), scores.end());