Time and Rand Function
Is there exists a datatype "time_t"?If yes how/why do use it?
Why do we pass time(NULL) in srand function to set the seed value?
1 2 3
|
//Also what does this code does?
time_t aTime;
srand( static_cast<unsigned>(time(&aTime)) );
|
If possible provide detailed solution.
PS - I am sorry if there are too much questions in one post.
Topic archived. No new replies allowed.