Hi
Is there member functions for STL's like vector,list etc., to shuffle the content of that STL.
eg:
1 2
|
int arr[] = {1,2,3,4};
std::vector<int> v1(arr, arr+ sizeof(arr) / sizeof(int) );
|
now i need to shuffle the data randomly like
Now vector may contain {3,2,4,1} or {2,1,4,3} ...
I have taken vector as an example. please let me know if there is any alternative way with other STL's
Thanks In Advance
Last edited on
Hi Peter
Thanks for the information.... :)