How to make c++ choose a random string

How do I make it so my program chooses a random pre-made string? or a random number or a random number + string? thanks a billion.
Last edited on
Create 2 strings.

use this - to insert a random number between 1 and 2 into a integer variable - http://www.cplusplus.com/reference/cstdlib/rand/

You can also youtube it, lots of videos showing how.

Then make 2 if statements.

If the random number is equal to 1, print out the first string, if its 2, print out the second string.

Try this out, come back with some code if you're stuck :)
Topic archived. No new replies allowed.