problems using Random_Device
Hello,
My question is if Random_Device works on windows . If so, what am I doing wrong in this implementation?
Code:
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_int_distribution.hpp>
#include <random>
#include<iostream>
#include<exception>
//This will create our ruler Dice
boost::random::mt19937 gen;
std::random_device rd;
int Roll_d( int n)
{
gen.seed( rd());
boost::random::uniform_int_distribution<> dist(1, n);
return dist(gen);
}
I get a thrown std::runtime_error at me.