Skip to content

Instantly share code, notes, and snippets.

@hi2p-perim
Created March 12, 2015 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hi2p-perim/54310e0a2558e802e247 to your computer and use it in GitHub Desktop.
Save hi2p-perim/54310e0a2558e802e247 to your computer and use it in GitHub Desktop.
Utilizing 種田梨沙さん as random seed for std::mt19937. Checked with VS2013.
#include <iostream>
#include <random>
#include <functional>
#pragma execution_character_set("utf-8")
int main()
{
std::mt19937 eng(std::hash<std::string>()("種田梨沙"));
std::uniform_int_distribution<int> dist;
std::cout << dist(eng) << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment