Random number generator

Nov 26, 2015 at 10:07pm
I have a random number generator randomizing a number between 1-9 but it takes a second to refresh and I have to get a new random number basically instantly. I am sort of a beginner at c++ so I would hope it is relatively simple. Thanks for the help.
Nov 26, 2015 at 10:09pm
I have this code that's giving me trouble, but I'm not going to give it to you. Can you guess what's wrong?

Well, probably so in this case. You're seeding your random number generator before every attempt to get a random number. Don't do that. seed the number once at the beginning of the program and don't seed it again.

And provide more detail next time you ask a question. ;)
Nov 26, 2015 at 10:57pm
ok well if i cant seed it again how do I come up with new numbers constantly in a while loop. my number generator currently gives me a new number every second
Nov 27, 2015 at 12:20am
Topic archived. No new replies allowed.