I can sort an int * array using stl as simple and simple as
std::sort(myarray, myarray + size);
Is there an easy way to randomize it?
thanks
std::random_shuffle (myarray, myarray + size);
std::random_shuffle
(myarray, myarray + size);
If you want to create new random content instead of shuffling those elements that already exist:
std::generate_n(myarray, size, &std::rand);
Source: https://habr.com/ru/post/1300437/More articles:column that will be hidden when creating a list item, but visible when editing a list item in sharepoint 2007 - sharepointIs Cast required for void **? - cSession vs. Cookie vs. Custom IPrincipal - cookiesWCF Why does netTCPBinding work fine with Kerberos authentication without any SPN settings? - securityAnother problem in Java inheritance? - javaIs it possible to host Silverlight widgets from a WPF application? - wpfWin32API: How to determine if EN_CHANGE was due to user action, not software action? - c ++Unable to authenticate using different NTLM credentials in one session using java.net.URLConnection - javastring matching algorithms used by lucene - javaCharacter set in MySQL; Can't insert special characters, why? - sqlAll Articles