I am constructing a program that randomly determines whom the user should send a text message to. Allow the user to enter five friends that will be used for the selection.
But it asks the user for a seed at the beginning but that doesn't determine how many names the user is allowed to put in.
== Who Should I Text? ==
Enter seed
Enter friend 0
Enter friend 1
Enter friend 2
Enter friend 3
Enter friend 4
You should text: Cat
These other friends didn't make the cut:
Adam
Bill
Damion
Edward
this is an example of what im trying to accomplish.
but the number that the user puts in at the beggining does not do anything im not sure how to code it the right way
== Who Should I Text? ==
Enter seed
Enter friend 0
Enter friend 1
Enter friend 2
Enter friend 3
Enter friend 4
You should text: Cat
These other friends didn't make the cut:
Adam
Bill
Damion
Edward
this is an example of what im trying to accomplish.
but the number that the user puts in at the beggining does not do anything im not sure how to code it the right way
The user always enters 5 friends, right? So use for (int counter = 0; counter < 5; counter++).
Then you should have a 5-element array of strings for the friend names (you already do have this, but it's named incorrectly: 'num_friends' shouldn't be a string, and it should just be called 'friends' or 'friend_names' so that its name represents what it actually is).
The random seed you're talking about comes after the user has entered all five names. You can let the user enter a seed, then seed the random number generator with that, if you'd like. See http://www.cplusplus.com/reference/cstdlib/rand/ for some help with that.