How do I randomize answer order with push_back ( please view to better understand my question thanks.

Hi, can anyone tell me how to now randomize the answer order within this code ?

I only included the relevant piece of code of the task in question.





questions.push_back(


"Question [1]"
"\n\n\n"

"What port does HTTPS use ? "




"\n\n1. 25 "

"\n\n2. 443 "

"\n\n3. 23 ");


answers.push_back("2");


I don't know why my post deleted but anyway use random_shuffle(questions.begin() , questions.end())
Last edited on
Thanks, I will try this out as soon as I get the code working that I wrote.

Not sure who deleted the post ?

Where abouts would I place this code, within the push_back or before it ?

Thanks.
If you could give me more of your code and using [*code][/*code] itd be easier to help
Last edited on
Topic archived. No new replies allowed.