I'm using g++ with MinGW in Windows to compile my c++ code, which looks like this:
std::mt19937_64 rng(std::random_device{}());
std::uniform_int_distribution<int> dist(0, words.size() - 1);
std::string curr = words[dist(rng)];
as you can see, this extracts a random word from an array of std::string, but when I optput that word, its always the same, i've realised that the problem lies in std::random_device, which outputs always the same number.
why is this happening? how can I fix it?
gcc version 5.3.0
I use vs code for programming if it could help
And of course i properly include random