Sep 16, 2012 at 10:45am
Hi, I want to write a function that will choose say m of the members of an array with n members, randomly. Could anyone help please?
Last edited on Sep 16, 2012 at 10:56am
Sep 16, 2012 at 11:35am
I think you should use expression std::rand() % n in a loop with m iterations.
Sep 21, 2012 at 12:03pm
Thanks JLBorges, it solved my problem.