#include #include #include //for class vector #include //for classes random_device and mt19937 #include //for the algorithm shuffle using namespace std; int main() { vector v { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90 }; //Use random_device to seed the Mersenne Twister random number generator random_device rd; mt19937 gen {rd()}; //Shuffle the vector. shuffle(begin(v), end(v), gen); //Demonstrate that the vector got shuffled. for (const auto i: v) { cout << i << "\n"; } return EXIT_SUCCESS; }