Why do I get the same sequence for every run with std::random_device with mingw gcc4.8.1?

后端 未结 5 1524
野性不改
野性不改 2020-11-22 02:46

I use the following code to test the C++ library.

Why do I get the exact same sequence for every run of the compiled executable? Is

5条回答
  •  醉话见心
    2020-11-22 03:11

    You may need to pass a parameter to the constructor:

    https://gcc.gnu.org/onlinedocs/gcc-4.9.1/libstdc++/api/a00899.html

提交回复
热议问题