Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get random seed #12

Open
vincent-winner opened this issue Jul 16, 2022 · 0 comments
Open

get random seed #12

vincent-winner opened this issue Jul 16, 2022 · 0 comments

Comments

@vincent-winner
Copy link

vincent-winner commented Jul 16, 2022

in example/lib/main.cpp file line 27 get_random_seed() function:

if use msvc compiler, may be also can use random_device()() function to get a true random seed, just like use it in linux

int get_random_seed() {
  #if defined(_MSC_VER) || defined (__linux__)
    return random_device()();
  #else
    return rand();
  #endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant