|
|
发表于 2011-7-9 18:03:00
|
显示全部楼层
Re:请教srand(GetTickCount())的作用
GetTickCount
The GetTickCount function retrieves the number of milliseconds that have elapsed since the system was started. It is limited to the resolution of the system timer. If you need a higher resolution timer, use amultimedia timer or a high-resolution timer.
srand
Sets a random starting point.
看到不懂的函数都不会查MSDN么?
以当前时间(微秒级)作为随机函数的起点(种子)。用来实现像随机的伪随机的。如果不知道什么叫伪随机,请度娘。 |
|