Hey guys, I just signed up for this website, seems its an awesome community for C++, which I plan on doing for fun. Anyhow, I am a beginner programmer, I took an intro class to C++ in highschool, and just started two days ago again for fun (i'm 27).
The problem is that I am using a random number generator with inputs for the high and low end of the random number (for damage range on a weapon in a game) which seeds Srand with the system clock, which is perfect for generating random numbers. However, because the system clock, and therefor Srand only changes every second, when the program generates random numbers, if the user doesn't wait a second inbetween asking for an output, it will remain the same until the next second has passed.
If this code is sloppy or confusing or inefficient sorry, this is just for fun. This is my function that I use. So basically if I hit enter (to run the function inside the program and execute a round of combat) 6 times in the same second, I'll get the same number 6 times.
Is there a way to make srand change quicker than once per second?