I have a program that uses the mt19937 random number generator from boost::random. I need to do a random_shuffle and want the random numbers generated for this to be from th
I thought it was worth pointing out that this is now pretty straightforward in C++11 using only the standard library:
#include #include std::random_device rd; std::mt19937 randEng(rd()); std::shuffle(vec.begin(), vec.end(), randEng);