rand() always returns the same value
Does this ring a bell to anyone? This only happens when linking to the multithreaded CRT (VC++ 8). I'm seeding srand with time(0).
Since the terms are so generic, I can hardly google it.
Mr. Powers
January 18th, 2006
Um, never mind, rubber duck question, figured it out immediately. (srand needs to be called from every thread.)
Mr. Powers
January 18th, 2006
In a civilized language, srand() is called automatically when required.