|
call srand() from your main function only once. The reason you're getting the same result is that the for loop is executed within a few milli-seconds and the seed is set to almost the same time, resulting in the same random number each time.
__________________
PFO - My daily dose of technology.
|