Need Help

1
2
3
time_t qTime;
time(&qTime);
srand((unsigned int)qTime);


What does time(&qTime); mean? Thanks.
What it is doing is passing a reference to qTime to the time function. This allows it to directly modify qTime, so that it will receive the details of the current time. Just note, if all you are doing here is seeding the random number generator, a more common approach is to do this:
srand(time(0));
Topic archived. No new replies allowed.