更新时间:2023-02-03 12:28:54
On iOS and OS X, use arc4random instead. Higher quality randomness, and no need to worry about seeding.
但是,除非您每次都调用srand
,否则rand()
不应是周期性的.或错误地使用了随机数.
However, rand()
shouldn't be noticably periodic, unless you're calling srand
each time around. Or using the random numbers incorrectly.