Does anyone know how you make a program where you input a list of names and the program outputs a random one? I had a guy make me a program like that a long time ago but I lost it. If someone could get me a program like that, C++ or otherwise, I would be very grateful.
Get all the names into a vector, or whatever else you want, and then generate a random number, and access the vector, f.ex. by using at() There's tons of information regarding random number generation, so pick up whatever search engine you like, and see if you find something useful. For vectors, you simply need a reference, if you don't know how they work.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks