- Nov 29, 2005
- 2,411
- 0
- 0
Simple question: I have a function that needs to generate a random number every time its called. Do I call srand ( srand((unsigned)time(0)); )once in some early program-wide initialization, or do I need to call it per function call? I assume its global, but I just wanted to check.