First time here? Check out the FAQ!
answered Aug 12 '13
#include <algorithm> // std::random_shuffle #include <vector> // std::vector #include <cstdlib> // std::rand, std::srand vector<int> permutation = 1, 2, 3, ..., 10 std::random_shuffle(permutation.begin(), permutation.end());