C++ random_device 관련 질문드립니다
-
게시물 수정 , 삭제는 로그인 필요
#include <iostream>
#include <random>
using namespace std;
int main()
{
random_device gen;
cout << "entropy == " << gen.entropy() << endl;
cout << "min == " << gen.min() << endl;
cout << "max == " << gen.max() << endl;
cout << "a random value == " << gen() << endl;
cout << "a random value == " << gen() << endl;
cout << "a random value == " << gen() << endl;
return 0;
}
위 코드에서 계속 같은 결과가 나오는데 무엇이 문제일까요 ?
#c++ random_device #c++ random_device mt19937 #c++ random_device thread safe #c++ random_device same number #c++ random_device set seed #c++ random_device example #c++ random device seed #c++ random_device performance #c++ random_device vs mt19937 #c++ random_device rd