Hello!!!!!
I am new to C++ and to programing in general, I would really appreciate it if you guys can help me with creating a tiny simple program:
I want to be able to create a program that would randomly chose 10 of a certain number of given variables. For example, I would give the program 50 words, and it will choose a random 10 of them.
I am really excited to learn more about programing :)
Thanks in advance!!!!!
I would start working on it. See what you can do on your own. When you get stuck or have a specific question, ask it. I'm guessing you know at least some of the basics to get started. When you get to the random part here is a link that'll help you set it up. http://www.cplusplus.com/reference/cstdlib/rand/
This isnt obvious to a new programmer, so I will give you a few more hints.
You can allocate the items you want to choose from and randomly select from those. This can be done using the built in vector container class with a built in algorithm (random shuffle) or by forcing a random value into the range of indices for an array.
the array is the easy and probably best to learn from if new to programming.
Thank you very much, I'll start with the program and ask you if I encounter a problem,
The link is very helpful :) but i didnt find the vector container class