How do I generate a random number using the C++11 standard library

后端 未结 7 1220
遇见更好的自我
遇见更好的自我 2020-12-05 05:34

The new C++11 Standard has a whole chapter dedicated to random number generators. But how do I perform the simplest, most common task that used to be coded like this, but wi

7条回答
  •  自闭症患者
    2020-12-05 05:51

    If your existing code was appropriate before the new standard, then it will continue to be. The new random number generators were added for applications which require a higher quality of pseudo-randomness, e.g. stochastic simulation.

提交回复
热议问题