Random shuffling of elements in STL containers

Use stl algorithm random_shuffle. This function has two overloads, first version randomizes using it’s own version of random number generator, second function takes a custom random number generator from our side. [sourcecode language=”cpp”]void TestShuffle() {     typedef short VT;     typedef std::vector VTVector;     // Count of elements     const VTVector::size_type Size = 10;     […]
Continue reading…