For code that uses std::random_shuffle
, I need to set a random seed so that the pseudorandom sequences produced vary in each program run.
The code example here makes a call to
srand ( unsigned ( time (NULL) ) );
which needs to
#include <ctime>
#include <cstdlib>
I wonder: Since C++11 includes major updates to pseudorandom number generation, is this still up to date? What should I use to set the random seed for std::random_shuffle
?