I have a small problem with rand(). It seems that in every iteration it outputs the same exact numbers... So, what function should i use, so that in every iteration i get new pseudorandom numbers?
[code]Your code goes here[/code]
You need to call to srand only one time in your entire program. Every time you call it the seed is generated, so if you use the same seed the pseudo random numbers will be the same.