May 2017
Intermediate to advanced
590 pages
17h 18m
English
To generate pseudo-random numbers in your application, you should perform the following steps:
#include <random>
std::random_device rd{};
auto mtgen = std::mt19937{ rd() };
auto ud = std::uniform_int_distribution<>{ 1, 6 };
for(auto i = 0; i < 20; ++i) auto number = ud(mtgen);
Read now
Unlock full access