dimanche 5 avril 2015

How to generate a random string between the strings contained in a vector?

Let's assume I have a vector of strings



vector<string> vec {"one", "two", "three", "four"};
string r;


I would like to have a random string (between the ones in vec) be generated and assigned to the string r.


How can I achieve this?





Aucun commentaire:

Enregistrer un commentaire