开发者

Do all C++ STLs produce the same random numbers (for the same seed)?

Do all C++ STLs pr开发者_如何学编程oduce the same random numbers (for the same seed)? Does this hold for all platforms? Is this specified somewhere?


No, the standard does not require a specific implementation. Also, the only standard way to get random numbers are rand and srand, and they are not part of what originally was the STL, but rather functions taken over from C.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜