title: Generate more than one random value using Mersenne-Twister
body: <p>I have recently encountered a problem while generating random numbers in C++, using the <code>Mersenne-Twister</code> algorithm. When iterating through the <code>for</code> loop and using <code>cout</code> to output the generated number, it outputs the same number repeatedly. For example, it outputs something like <code>11 11 11</code> instead of <code>11 43 124</code>. How would I achieve this with code? My current code is posted below.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;random&gt;
  #include &lt;Windows.h&gt;
  #include &lt;unistd.h&gt;
  
  using namespace std;
  
  int main() 
  {
    random_device rd;
    mt19937 gen(rd());
    uniform_int_distribution&lt;&gt; dis(15000, 120000);
    int random = dis(gen);
  
    int i = 1;
    while (i = 1) {
      cout &lt;&lt; random &lt;&lt; endl;
  }
  return 0;
  </code></pre>
  
  <p>Any help is greatly appreciated.</p>