I\'m just diving into some C++ and I decided to make a random number generator (how random the number is, it really doesn\'t matter). Most of the code is copied off then net
The problem is that you use srand everytime. CPU is so fast that it will execute all this code in a single second, so you get the same seed each time.
Move srand out of the loop, call it only once.