Hi, I can sort a int* array using stl, plain and simple like
std::sort(myarray, myarray + size);
Is there any equal simple way to randomize it?
thanks
Hi, I can sort a int* array using stl, plain and simple like
std::sort(myarray, myarray + size);
Is there any equal simple way to randomize it?
thanks
If you want to generate new random content instead of shuffling the elements that are already there:
std::generate_n(myarray, size, &std::rand);