开发者

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

开发者 https://www.devze.com 2023-03-07 22:51 出处:网络
Do all C++ STLs pr开发者_如何学编程oduce the same random numbers (for the same seed)? Does this hold for all platforms?

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

精彩评论

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