title: Each simulation of normal distribution is the same (C++)
body: <p>I write a code to simulate a normal distribution in C++. But each time it seems the result is the same.  My question is what't the reason of this phenomenon and How to fix it?  I never have this problem with Python. Any references are very appreciated.  </p>
  
  <pre><code>// Simulation.cpp : Defines the entry point for the console application.
  #include "stdafx.h"
  #include &lt;iostream&gt;
  #include&lt;random&gt;
  
  void main(){
  
       // create default engine as source of randomness
       // The maxtime we do expriements is 10000
       // Record to the sum of the maxtimes sample
      std::default_random_engine dre; 
      const int maxtimes = 10000;
      double sum = 0.0 ;
      // Generate the normal distribution witn mean 0 and variaiton 1.
      std::normal_distribution&lt;double&gt; distribution(0.0, 1.0);
      // Output the result and Record their sum. 
      for( int i=0; i&lt;maxtimes; ++i)
        {
  
          double x = distribution(dre);
          std::cout &lt;&lt; x &lt;&lt; ":";
          sum +=x; 
          x =0.0; 
        }
      std::cout&lt;&lt;std::endl;
      std::cout &lt;&lt;" The average sum is: " &lt;&lt; sum/10000 &lt;&lt;std::endl; 
    }
  </code></pre>
  
  <p>My code runs in visual C++ 2010. </p>