New C++ Style Random Numbers
/* * Generate random numbers the new way. */ #include <iostream> #include <random> #include <chrono> int main() { std::minstd_rand0 randgen (std::chrono::system_clock::now().time_since_epoch().count()); for(int i = 1; i <= 5; ++i) { std::cout << randgen() << " "; } std::cout << std::endl; }