Skip to content

Instantly share code, notes, and snippets.

@kasper93
Created October 16, 2014 11:38
Show Gist options
  • Save kasper93/8179c43f3fceb5459c4c to your computer and use it in GitHub Desktop.
Save kasper93/8179c43f3fceb5459c4c to your computer and use it in GitHub Desktop.
#include <random>
#include <iostream>
int main() {
std::random_device rd;
std::mt19937_64 gen(rd());
std::uniform_int_distribution<int> dis(-10,10); // domyślny konstruktor robi dla całego int, abo czegokolwiek co wpiszesz...
std::cout << dis(gen) << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment