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
I think you should use expression std::rand() % n in a loop with m iterations.
Thanks JLBorges, it solved my problem.