QuoteOriginally posted by: HansiBecause you are setting the random number seed to time(0) every time the function is called:
http://www.cplusplus.com/reference/clib ... nd/alright, i need to execute "srand((unsigned)time(0));" only at the begining before generating the random numbers (e.g. including it in the int main() ) . although, i dont quite understand why this is the case. if you use srand((unsigned)time(0)); later in the program the system time is differnt and, hence, the seed should be different from when it was first called. thanks anyways