Generator

Write your question here.

Hey guys please help me whit this ..how can i generate A random names in c++
as an example You type 10 names the programe needs to genrate and pick randomly 5 names ...thanx for advance
> You type 10 names the programe needs to genrate and pick randomly 5 names

Put the ten names into a std::vector<std::string>, shuffle it randomly http://en.cppreference.com/w/cpp/algorithm/random_shuffle , and pick the first five names in the sequence.
Topic archived. No new replies allowed.